Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm install hangs

Tags:

node.js

npm

This is my package.json:

{ "name": "my-example-app", "version": "0.1.0", "dependencies": {    "request": "*",   "nano": "3.3.x",   "async": "~0.2"   } } 

Now, when I open the cmd and run npm install, the install hangs. What am I doing wrong?

like image 927
user1090227 Avatar asked Jun 01 '13 14:06

user1090227


People also ask

What to do if npm install hangs?

To solve the issue, try removing the entire node_modules/ folder and the package-lock. json file. Then try running the npm install command again. That may fix the issue.

Why is my npm install failing?

code 1 error usually occurs when you run the npm install command. This cause of this error is that one of the dependencies you define in your package. json file fails to be installed properly on your computer. This means that npm fails to install the node-sass module that's added as a dependency to the n-app project.

Why is npm slow?

If you find that npm is running slow and it isn't your computer or internet, it is most likely because of a severely outdated version.

What is reify in npm?

to make (something abstract) more concrete or real. "these instincts are, in humans, reified as verbal constructs" to regard or treat (an idea, concept, etc.) as if having material existence. to enable ECMAScript 2015 modules in any version of Node.js.


1 Answers

I had the same problem. The reason - wrong proxy was configured and because of that npm was unable to download packages.

So your best bet is to the see the output of

$ npm install --verbose 

and identify the problem. If you have never configured proxy, then possible causes can be

  • Very outdated npm version.
  • Some problem with your internet connection.
  • Permissions are not sufficient for npm to modify files.
like image 191
Harshil Lodhi Avatar answered Oct 11 '22 00:10

Harshil Lodhi