The problem: while using nvm
to install Node.js I was able to install the version of Node.js I need, but nvm
does not install npm
automatically. NPM's page provides no information about installing it. Being not much of a Windows user myself I am completely at a loss...
Every result in Google seems to use Node.js MSI installer to get that working - which is not an option in my case. So, how do I?
https://nodejs.org/download/ . The page has Windows Installer (.msi) as well as other installers and binaries.Download and install for windows.
Node.js comes with NPM.
NPM is located in the directory where Node.js is installed.
I wrote a quick simple app recent that handle the management of various version of node and npm. It allows you to choose different version of node and npm to download and select which version to use. Check it out and see if it's something that's useful.
https://github.com/nhatkthanh/wnm
First CD to where node(nodejs) is installed using windows CMD, then follow the steps below
Download the latest Node.js MSI (4.x or 5.x) installer and run the following via command line:
This will extract the binaries into
C:\Node.js\nodejs
.Then you will want to add
C:\Node.js\nodejs
PATH
environment variable.To update NPM, do the following:
After that completes, you should be able to check the versions:
Node should be 4.4.3+ (whichever you installed) and npm should be 3.8.7+.
To install npm on windows just unzip the npm archive where node is. See the docs for more detail.
npm is shipped with node, that is how you should install it. nvm is only for changing node versions and does not install npm. A cleaner way to use npm and nvm is to first install node as it is (with npm), then install the nvm package by
npm install nvm