𝗪𝗶𝗻𝗱𝗼𝘄𝘀 𝗪𝗦𝗟 𝗮𝗻𝗱 𝗡𝗲𝘅𝘁.𝗷𝘀 𝗦𝗲𝘁𝘂𝗽
You can get a Linux development experience on Windows. This setup uses WSL, Node.js, pnpm, and Next.js. It is fast and professional.
Follow these steps to build your environment.
- Install WSL Open PowerShell as an admin and run: wsl --install
This installs Ubuntu. You now have a Linux environment inside Windows.
- Prepare Linux Open your WSL terminal and run these commands:
- Check your home directory: cd ~
- Create a folder: mkdir projects
- Update your system: sudo apt update && sudo apt upgrade
Install Node.js via NVM Use NVM to manage your Node versions. Run: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash nvm install --lts nvm use --lts
Setup pnpm pnpm is faster than npm and saves disk space. Enable it with Corepack: corepack enable pnpm
Create a Next.js Project Run this command to start a new project: pnpm create next-app@latest my-project --typescript --tailwind --eslint --app
If you see an [ERR_PNPM_IGNORED_BUILDS] error, run: pnpm approve-builds Then run: pnpm install
- Connect VS Code Install the WSL extension in VS Code. In your terminal, type: code .
VS Code runs on Windows but connects to your Linux environment. This is the best way to work.
Why this setup works:
- Fast performance
- Access to Linux tools
- Better dependency management
- Professional workflow
To free up RAM when you finish, run: wsl --shutdown
Source: https://dev.to/anikdebnath/windows-wsl-nextjs-development-setup-zero-to-professional-environment-cl1