Installing NPM under Windows

Source: Internet
Author: User
Tags install node

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

    Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.