Install npm (Node.js Package Manager) on Windows (w/o using Node.js MSI)

前端 未结 11 2013
孤独总比滥情好
孤独总比滥情好 2020-12-23 12:53

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 auto

11条回答
  •  萌比男神i
    2020-12-23 12:59

    Download the latest Node.js MSI (4.x or 5.x) installer and run the following via command line:

    msiexec /a node-v4.4.3-x64.msi /qb TARGETDIR="C:\Node.js"
    

    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:

    cd C:\Node.js\nodejs
    npm install npm@latest
    

    After that completes, you should be able to check the versions:

    node --version
    npm --version
    

    Node should be 4.4.3+ (whichever you installed) and npm should be 3.8.7+.

提交回复
热议问题