The following steps assume a standard installation of Node.js.
Npm v3.x gives the advantage of a flat file system for node modules. See their docs.
Below are steps I wrote in my notebook past September and performed again just last month with very small corrections. So far, from my limited usage, npm works like a charm and I haven’t seen any problems.
- Download a stable release from the GH release page.
- Extract the files to “%APPDATA%\Roaming\npm\node_modules\npm”
- From the root of the Node.js installation folder: move files
npm + npm.cmdto “%APPDATA%\Roaming\npm”
- copy .npmrc and npmrc from the default npm folder to “%APPDATA%\Roaming\npm\node_modules\npm”
Wether or not still relevant but back then I remember having a problem with node-gyp. This is what did it, “-p” being the OS arch:
npm install node-gyp-install -g
node-gyp-install -p x64
Check in your shell with “npm –version”.