Next.js Discord

Discord Forum

[Questions, not help about code] NextJS: Does it work the same on Linux as on Windows?

Answered
Savannah posted this in #help-forum
Open in Discord
SavannahOP
Hello, I'm currently doing a work placement for my studies. I have to create a web mapping application and I was wondering about the work environment. The computer system at the company where I'm doing my internship runs on Linux (although I've always developed under Windows). So I'd like to know if NextJS works the same way or not? If there's anything I need to take into account, or even if you have any advice.

Thanks for your feedback!
Answered by Arboreal ant
Next itself will work the same way, package dependencies might be slightly different though. If you try to do npm ci on a different system than the developer used your mileage may vary. Some package binaries are different for different systems and it can cause issues. Has bitten me in the past when I used to develop on windows.

The servers you host next on run linux, so ideally all local dev would be done with the code executing on linux also. It avoids these kinds of issues. Can use docker on windows to run next inside a little linux container. But that's by the by
View full answer

10 Replies

Arboreal ant
Next itself will work the same way, package dependencies might be slightly different though. If you try to do npm ci on a different system than the developer used your mileage may vary. Some package binaries are different for different systems and it can cause issues. Has bitten me in the past when I used to develop on windows.

The servers you host next on run linux, so ideally all local dev would be done with the code executing on linux also. It avoids these kinds of issues. Can use docker on windows to run next inside a little linux container. But that's by the by
Answer
my choice would be WSL. developing websites on windows directly has become so much pain that i don't think i'll ever subject myself to that hell again
Arboreal ant
Yeah WSL is an even better option. Has quite a few gotchas which you don't get running real linux with networking, file system, editor setup etc. But it's much better than windows.
Windows Subsystem for Linux
Basically a baked in linux vm for windows
Thats very easy to get going
You can even setup vscode on windows and ssh into the WSL instance and get the windows experience while benefits of linux (thats what I do typically)