Node.js Environment
A clean setup saves time later. Choose one Node version, one package manager, and one editor workflow before you start serious work.
Install Node
Use an official installer or a version manager such as nvm so you can switch versions when projects require it. On Windows, the official installer is usually the easiest start. On macOS and Linux, a version manager gives you better project control.
Project basics
mkdir node-lab
cd node-lab
npm init -y
node -v
npm -v
Tools for writing Node code
- VS Code for IntelliSense, debugging, and TypeScript support.
- WebStorm for a heavier IDE workflow with deep refactoring support.
- Neovim or another terminal editor if you prefer a lean CLI-first setup.
- Git for source control and clean collaboration.
Package manager choices
- npm is the default and works everywhere.
- pnpm is efficient for large dependency trees.
- yarn is common in existing projects and build stacks.
Practice
- Install Node and confirm the version in a terminal.
- Create one empty project and inspect
package.json. - Write down which package manager you will use and why.