I am new to node and npm and have been tryng to update npm from version 1.4.3 o the latest one. The procedure I am following to do this is
navigate to C:\Program Files (x86)\nodejs with cmd.exe and then run the installation without -g: npm install npm (from npm github)
The problem is that when I run
npm install npm
I get
npm ERR! not a package C:\Program Files\nodejs\npm
npm ERR! addLocal Could not install C:\Program Files\nodejs\npm
npm ERR! Windows_NT 6.2.9200
npm ERR! argv "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "npm"
npm ERR! node v0.10.30
npm ERR! npm v2.2.0
npm ERR! path C:\Users\ADMINI~1.PLA\AppData\Local\Temp\3\npm-9796-44646cae\unpack-c30e5ffdacdb\package.json
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! enoent ENOENT, open 'C:\Users\ADMINI~1.PLA\AppData\Local\Temp\3\npm-9796-44646cae\unpack-c30e5ffdacdb\package.json'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
But after this when I run
npm --version
it shows me
N:\Program Files\nodejs>npm -v
2.2.0
but from some other folder it still shows me
N:\Program Files>npm -v
1.4.3
So, how can I fix this.