Environment setup
Install Node.js with a version manager so you can switch versions per project. Node is required for everything else - the apps, the websites, and the Shopify CLI.
Why NVM
NVM (Node Version Manager) lets you install multiple Node.js versions on one machine and switch between them per project. Use nvm-windows on Windows; on macOS and Linux use the original nvm (see below).
The original
nvm does not support Windows - Windows users need nvm-windows, which works the same way.Before you install (Windows)
- Uninstall any existing Node.js from Settings → Apps → Node.js.
- Delete leftover folders if they exist:
C:\Program Files\nodejs C:\Users\<YourName>\AppData\Roaming\npm
Install nvm-windows
- Download
nvm-setup.exefrom the latest release:https://github.com/coreybutler/nvm-windows/releases - Run the installer and follow the prompts - the default paths are fine.
- It adds nvm to your PATH automatically.
Verify the install
Open a new Command Prompt or PowerShell window and run:
nvm versionYou should see a version like 1.2.2. If you get “command not recognized”, restart your PC and try again.
Install & switch Node versions
nvm install lts # latest LTS (recommended)
nvm install 20 # a specific version
nvm use 20 # switch to it
nvm current # show active version
nvm list # list installed versionsOn Windows, run the terminal as Administrator when using
nvm use - nvm updates a symlink under C:\Program Files\ and will otherwise fail with “Access Denied”.Confirm Node and npm work:
node -v
npm -vmacOS / Linux
On macOS and Linux, install the original nvm, then use the same install / use commands:
# install nvm (see the repo for the latest install line)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
# restart the terminal, then:
nvm install --lts
nvm use --lts
node -v && npm -vBefore running any install script from the internet, open the URL and read it first. Only run scripts from the official source (here, the nvm-sh/nvm repo).
Command cheatsheet
| Command | Description |
|---|---|
nvm install lts | Install latest LTS Node.js |
nvm install 20 | Install Node.js v20 |
nvm use 20 | Switch to Node.js v20 |
nvm list | List installed versions |
nvm current | Show active version |
nvm uninstall 18 | Remove Node.js v18 |