Why Node.js is important
Node.js is the most common build toolchain for modern web applications (React, Vite, Ant Design, Next.js). On Windows 11, it lets you install dependencies, compile your source code into a production build, and publish only the final optimized output.
- Develop your project locally.
- Build once it is ready:
npm run build. - Publish the output folder only (
dist/orbuild/). - Serve with IIS (static) or run a Node server only when needed (SSR/API).
Install Node.js on Windows 11
The recommended method is the official Node.js Windows installer (MSI). It includes npm automatically.
- Download Node.js from the official website (LTS recommended).
- Choose Windows Installer (.msi).
- Run the installer as a normal user (Administrator not required in most cases).
- Keep the defaults checked:
- Add to PATH
- npm package manager
- (Recommended) Tools for native modules
- Finish, then open a new PowerShell window (important).
Double-check everything installed properly
Open PowerShell and run:
You should see version numbers (example: v20.x.x). That confirms Node.js and npm are installed.
This confirms Windows is using the correct binaries:
Expected output is usually something like:
C:\Program Files\nodejs\node.exe
C:\Program Files\nodejs\npm.cmd
If you see a new package.json file, npm is working correctly.
Inside a real web project, run:
Most modern projects generate:
• Vite: dist\
• CRA: build\
dist\ or build\ to your server / IIS site folder.
Do not publish your full dev folder when deploying.
Recommended downloads
Only install Node.js from trusted sources.
Choose LTS if you want the most stable version for production builds.
Troubleshooting
If something does not work, these are the most common fixes.
- Close all terminals and open a new PowerShell window.
- Run
where nodeagain. - If still missing, reinstall Node.js and ensure “Add to PATH” is checked.
Some npm packages require compilation. If you enabled Tools for native modules during install, Windows can auto-install required build tools when needed.
If you installed build tools recently, restart your machine to ensure everything is loaded.
IIS typically serves static files. For React/Vite apps, you usually publish the build output only. You only need Node running on a server when your project is:
- Server-side rendered (SSR) apps like Next.js (server mode)
- Node APIs / backend services
- Real-time WebSocket services
Always download Node.js from the official website. Avoid unknown installers or modified distributions.