I\'m trying to install some node packages through npm, but it won\'t go. I\'ve already tried to install/unistall/update node, but nothing seems to work.
I\'m using u
npm install <packagename> --registry http://registry.npmjs.org/
Try specifying the registry with the install command. Solved my problem.
I had this issue, and doing npm cache clean
solved it.
I also had problem in Ubuntu 15.10 while installing gulp-preetify.
The problem was:
Registry returned 404 for GET on http://registry.npmjs.org/gulp-preetify
I tried by using npm install gulp-preetify
but it didn't worked.
npm i gulp-preetify
and it just got installed. I cannot guarantee that it will solve your problem but it won't harm with a single try.
Following on from LAXIT KUMAR's recommendation, we've found that at times the registry URL can get corrupted, not sure how this is happening, however to cure, just reset it:
npm config set registry https://registry.npmjs.org
The 404 disappeared as it was going to the correct location again.
Translated:
It happened the same to me and in my case in particular was because the package.json was wrong. example:
{
"name": "app",
"version": "0.0.0",
"description": "any description",
"main": "index.js",
"author": "me", ->wrong
}
The last comma was left over and it gave me error any instalacción with npm in this proyect
then:
{
"name": "app",
"version": "0.0.0",
"description": "any description",
"main": "index.js",
"author": "me"
}
I hope it will help.
If anyone is specifically getting Unexpected token <
, and your package.json is fine, check your npm-shrinkwrap.json file! I had unresolved merge issues in mine, and fixing that resolved everything.