npm ERR! Could not create /usr/lib/node_modules/___npm.npm
npm ERR! error installing email@example.com Error: EACCES, Permission denied '/usr/lib/node_modules'
npm ERR! Error: EACCES, Permission denied '/usr/lib/node_modules'
npm ERR! Report this entire log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! firstname.lastname@example.org
npm ERR! System Linux 3.0.0-12-generic
npm ERR! command "/usr/bin/node" "/tmp/npm.29786/package/cli.js" "install" "-gf"
npm ERR! cwd /tmp/npm.29786/package
npm ERR! node -v v0.4.12
npm ERR! npm -v 1.0.103
npm ERR! path /usr/lib/node_modules
npm ERR! code EACCES
npm ERR! Additional logging details can be found in:
npm ERR! /tmp/npm.29786/package/npm-debug.log
npm not ok
curl http://npmjs.org/install.sh | sudo sh
Hi, I am a newbie to node.js and have installing npm for the first time and having some trouble using the one line install.
when i use the :
curl http://npmjs.org/install.sh | sudo sh
I get nothing. (I mean the file is downloaded but then the prompt returns and npm is not installed)
and when i use:
curl http://npmjs.org/install.sh | sh # without sudo
I get the error :
failed to get tarball url for npm/latest
Please advise .TIA
I don't know whether this is the right post to bring this up or not because there was another similar post but that was closed issue and I did not have permission to reopen it. If I am wrong please redirect me to the correct post.
curl http://npmjs.org/install.sh | sh
npm_debug=1 curl http://npmjs.org/install.sh | sudo sh
@thejh The npm_debug=1 needs to be on the sh, as well, and requires a bash/zsh capable interpreter.
curl http://npmjs.org/install.sh | sudo npm_debug=1 bash
@devansh What operating system are you seeing this no-output behavior on? A few people have reported similar results, and I can't seem to track it down. It always seems to work using bash in debug mode, so I'm guessing it's some kind of sh-related thing.
Using the command you suggest says : curl couldn't connect to host
Clone of 'https://github.com/isaacs/abbrev-js.git' into submodule path 'node_modules/abbrev' failed
4.I also followed your instructions in #1540 where in you have told to use the following command:
(curl -SsL -k https://registry.npmjs.org/npm/latest; echo "") | sed -e 's/^.*tarball":"//' | sed -e 's/".*$//'
and i get the output as nothing. The prompt simply returns. I am at a loss on what to do. I need to install npm urgently. I thought of installing by downloading from tarball but the guy in issue#1540 had some issues with that too.But I guess I will give it a try too. TIA
I also tried installing by downloading the tarball from :http://registry.npmjs.org/npm/-/npm-1.0.96.tgz and then untar-ing it and then ./configure and sudo make install but I am having the same problem as issue#1540 (#1540)
does it have to do something with me using http:// instead of https:// because https:// does not install? It says curl couldn't connect.
And moreover using the s command for getting the url does get me : http://registry.npmjs.org/npm/-/npm-1.0.103.tgz when I use http:// instead of https://.
I guess I am right and also a complete novice if I understand it now that this might be a issue of my office network.
@devansh I think you are correct, and that this is a network issue on your end. I'm not sure how to help you.
@isaacs, @devansh I guess this is because of SSL certificate verification failure. curl performs it by default. Using -k option will turn off curl's verification of the certificate
Yup, you are right. Had to set up proxy for https server too
had an issue with the installation due to proxy settings, but managed by adding '-E' to the sudo command. 'sudo -E' allows the proxy environment variables set in the normal user mode.
curl http://npmjs.org/install.sh | sudo -E npm_debug=1 bash
... and i had to replace sh with bash (Ubuntu 11.10)
Hey guys, for posterity, now it's:
curl https://npmjs.org/install.sh | sudo sh
homeboy's using ssl
And by the way, in case this helps anyone else out: It's possible to get into a weird wormhole where you start getting ENOENT and lstat errors and stuff, particularly if you've been "using" (npm link that is). I'm no expert on any of this stuff, but if you delete your ~/.npm folder, it seems to do the trick.
I get this same issue, I fixed it with:
curl http://npmjs.org/install.sh -o install.sh
sudo chmod 777 install.sh
i'm getting same error
301 Moved Permanently
i tought that the page has been removed,
The page hasn't been removed. It's been moved. Permanently.
Add -L to your curl command.
Where has it been moved to?
Try this,,It will work..
sudo curl -k -L https://npmjs.org/install.sh | sudo sh
I forgot how many times I runned npm update npm -g without sudo and got npm breaked because it unlinks everything at the beginning. So annoying.
npm update npm -g
Debashish. Thanks. I had the same issue.. it is simply moved and got it to work by this -L. Super.