installing NPM under WindowsTags: windowsnode.jsgitexpresspathcmd2011-11-05 13:18 36528 People read Comments (8) favorite reports This article has been included in:Classification:RIA
(139) Author of similar articles
X
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
node. JS Ceasefire Technology Forums are discussed, the previous period of work is too busy to study, while the weekend idle play, find some information on the Internet found that node. JS itself has the Windows version and the UNIX version of the download and use is very convenient but its extension module relies on the complexity of manually downloading to the website is very troublesome, so the NPM introduction is Require installation on Linux or on Windows via Cygwin, follow the online method to download Cygwin install node. JS is unsuccessful (execution./configure Cygwin not supported) many attempts have been fruitless, the Internet is no answer, In the spirit of the collapse of the border inadvertently opened the NPM documentation, there is a section to explain how to install NPM under Windows, follow its instructions to finally successfully installed NPM under Windows. It is still cool to use the download file is a bit slow.
Step one: Download the current version of the Windows version of node. JS is Http://nodejs.org/dist/v0.5.10/node.exe The second step: Set the environment variable to add the directory where Node.exe resides in the PATH environment variable. After the configuration is successful, you can see the version number of node. js in cmd via node--version c:\users\fn>node--version
v0.5.10 Step three: Install Git
Download the git Windows installation article directly to the following address (Http://code.google.com/p/msysgit/downloads/list), The latest version is Git-1.7.7-preview20111014.exe, follow the prompts step by step installation can be. Add git Install bin directory to PATH environment variable after installation is complete
CMD Run to git --version
confirm the installation is successful
C:\users\fn>git--version
git version 1.7.7.msysgit.1
Fourth Step: Install NPM
After making sure that both Node.exe and git are in the PATH environment variable, execute the following command:
git config --system http.sslcainfo /bin/curl-ca-bundle.crt
git clone --recursive git://github.com/isaacs/npm.git
cd npm
node cli.js install npm -gf
Here's a test of success, everything OK start the node. JS Tour
D:\DEVELOP\NODEJS\HELLO>NPM install-d
NPM Info It worked if it ends with OK
NPM info using [email protected]
NPM info using [email protected]
NPM Info Preinstall [email protected]
NPM info addnamed [' Jade ', ' >= 0.0.1 ']
NPM info addnamed [' Express ', ' 2.5.0 ']
It's better to set up a domestic image, or the download will be slow
GitHub NPM hits the wall with a solution.
GitHub
Proxy server is a must, I use the local Astrill
Set up a proxy for curl
Export http_proxy= "127.0.0.1:3213"
Export https_proxy= "127.0.0.1:3213"
Okay, OK.
Npm:
Set the domestic Image NPM Config set Registry http://registry.npmjs.vitecho.com
Installing NPM under Windows