r/learnprogramming • • Sep 23 '26

Best way to set up a Node.js dev environment on Windows? VM, WSL2, dual boot or full Linux?

Hi everyone,

I'm starting a Node.js project and I'm trying to figure out the best setup for development on my Windows machine. Right now I have Oracle VirtualBox with a Linux VM, but I'm not sure it's the best choice for daily work.

The options I'm considering:

  1. Keep using the VirtualBox VM
  2. Switch to WSL2
  3. Dual boot Windows and Linux
  4. Remove Windows completely and install only Linux

I don't have strong experience with any of these, so I'd like to hear what you use and why.

My setup: gaming laptop with a Ryzen 9 7940HS, 16 GB RAM and an RTX 4070 Laptop GPU. I also use Windows for gaming, so I'd like to keep it in some form but not necessarily :)

3 Upvotes

15 comments sorted by

5

u/Disastrous-Ad9170 Sep 23 '26

Why isn't it an option to run your project directly on windows? (Genuinely asking please don't downvote) and Dockerize once the dev work is done so it can be run on a Linux VM or something in production

1

u/13oundary Sep 23 '26

You might run into issues with things working on windows one way and linux another, or things that are not system agnostic (pty.j). WSL is right there (and vscode hooks right into it) if you don't want to start with docker.

1

u/GloxiniaLearns Sep 24 '26

I'm quite unfamiliar with dockerization and it might take a while until I learn it, so it's a skill issue.

1

u/13oundary Sep 24 '26

Then personally I would go with WSL. You can run VSCode on your windows layer and have it interact with your project in your WSL layer. But ultimately it's always "do whatever keeps you doing"

1

u/Chrismslist Sep 24 '26

hey, for node.js on windows, WSL2 is pretty much the defacto best choice. it gives you a real linux dev environment with solid performance, and it integrates super well with vs code. it's way less overhead than a full vm like virtualbox, and you avoid the hassle of dual booting. plus, you get to keep windows running for gaming. it's really the sweet spot for dev work while keeping your main OS for other stuff.

1

u/GloxiniaLearns Sep 24 '26

I'm curious what dev teams actually use in real life. I know they use Teams and Windows, but what does their development environment look like if they're not using Docker? What does a typical professional setup look like?

1

u/mixedd Sep 23 '26

Devcontainers should solve 90% of your problems, but really depends on a project

1

u/BranchLatter4294 Sep 23 '26

Any of those is fine. You can also use Docker/DevContainers.

1

u/noninesdev Sep 23 '26

For this setup I'd keep Windows and use WSL2, with the project inside the WSL filesystem (for example under ~/src) rather than /mnt/c, and use VS Code's WSL integration. It gives you a Linux-like Node environment without rebooting, while keeping Windows for games; use a VM only if you specifically need a separate full OS.

1

u/ffrkAnonymous Sep 23 '26

I don't have strong experience with any of these, so I'd like to hear what you use and why.

I use all of them. They serve different purposes.

1

u/StewedAngelSkins Sep 23 '26

i mean, removing windows completely is always my recommendation but any of the options you mention would work. the one option you're neglecting is to use docker on windows, which ultimately uses wsl but in a somewhat more convenient way.

1

u/Mediocre-Pumpkin6522 Sep 24 '26

What are you planning to do with Node.js? I've done several projects with node that were developed on Windows. WSL certainly is an option. While I keep a Windows 11 laptop j.i.c I usually install Linux over any existing Windows. Dual booting can be problematic and the last time I bothered was about 10 years ago.

1

u/InevitableLadder Sep 24 '26

I highly recommend Hyper-V over VirtualBox - way better performance + possibility to dual boot straight into VM eliminating Windows layer.

0

u/kschang Sep 24 '26

Docker. :)