I have downloaded Windows Binary (.exe) of nodejs from the main page.
How can I install and use npm
(Node package manager)?
I have downloaded Windows Binary (.exe) of nodejs from the main page.
How can I install and use npm
(Node package manager)?
When Node.js is not installed using the msi installer, npm needs to be setup manually.
setting up npm
First, let's say we have the node.exe file located in the folder
c:\nodejs
. Now to setup npm-c:\nodejs\node_modules
andc:\nodejs\node_modules\npm
c:\nodejs\node_modules\npm
folderc:\nodejs\node_modules\npm\bin
toc:\nodejs
folderIn order to test npm, open
cmd.exe
change working directory toc:\nodejs
and typenpm --version
. You will see the version of npm if it is setup correctly.Once setup is done, it can be used to install/uninstall packages locally or globally. For more information on using npm visit https://docs.npmjs.com/.
As the final step you can add node's folder path
c:\nodejs
to thepath
environment variable so that you don't have to specify full path when runningnode.exe
andnpm
at command prompt.I've just installed 64 bit Node.js v0.12.0 for Windows 8.1 from here. It's about 8MB and since it's an MSI you just double click to launch. It will automatically set up your environment paths etc.
Then to get the command line it's just
[Win-Key]+[S]
for search and then enter "node.js" as your search phrase.Choose the
Node.js Command Prompt
entry NOT theNode.js
entry.Both will given you a command prompt but only the former will actually work. npm is built into that download so then just
npm -whatever
at prompt.Search all .npmrc file in your system.
Please verify that the path you have given is correct. If not please remove the incorrect path.
I am running node.js on Windows with npm. The trick is simply use cygwin. I followed the howto under https://github.com/joyent/node/wiki/Building-node.js-on-Cygwin-(Windows) . But make sure that you use version 0.4.11 of nodejs or npm will fail!