Skip to content


Subversion checkout URL

You can clone with
Download ZIP


npm install hangs (node v0.8.17 & npm v.1.2.0) #3058

scriby opened this Issue · 12 comments

10 participants


I just upgraded to the latest node & npm using the mac installer, and npm install from the command line in a directory that has a package.json hangs for me now.

Here's some more data which might help narrow it down:

  • node v0.8.16 & npm 1.1.69 work fine
  • "npm install [package]" works fine
  • If I remove all dependencies from the package.json, it doesn't hang
  • If I leave one dependency in the package.json, it hangs (it doesn't appear to matter which one. I tried normal dependencies, git roots, etc.)
  • I tested two different projects, and checked out new code and tried (didn't help)
  • I removed the contents of the node_modules folder and tried (didn't help)
  • No npm-debug.log is generated, and no error is thrown. The only thing that gets printed is some warnings about no readme for projects that were already installed (which I've seen for quite some time)

Can you add -dd to the command line and post the complete output, along with the problem package.json file?


I had the same issue, my project already had a node_modules/ with a .gitignore file in it. After removing the node_modules dir npm install worked fine.

It appears as though npm doesn't like it if the node_modules folder already exists. Only it throughs no warnings or errors and just hangs.


I fixed this in a fork and sent a pull request. #3072


Also affects npm publish

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node',
1 verbose cli   '/usr/bin/npm',
1 verbose cli   '-ddddd',
1 verbose cli   'publish',
1 verbose cli   'borschik-ycssjs-0.0.2.tar.gz' ]
2 info using npm@1.2.0
3 info using node@v0.8.17
4 verbose publish [ 'borschik-ycssjs-0.0.2.tar.gz' ]
5 verbose read json /home/lynn/borschik-ycssjs-0.0.2.tar.gz/package.json
6 error Error: ENOTDIR, open '/home/lynn/borschik-ycssjs-0.0.2.tar.gz/package.json'
7 error If you need help, you may report this log at:
7 error     <>
7 error or email it to:
7 error     <>
8 error System Linux 2.6.32-279.2.1.el6.x86_64
9 error command "/usr/bin/node" "/usr/bin/npm" "-ddddd" "publish" "borschik-ycssjs-0.0.2.tar.gz"
10 error cwd /home/lynn
11 error node -v v0.8.17
12 error npm -v 1.2.0
13 error path /home/lynn/borschik-ycssjs-0.0.2.tar.gz/package.json
14 error code ENOTDIR
15 error errno 27
16 verbose exit [ 27, true ]

I also have some extra stuff in the node_modules folder and a .gitignore.


@scriby If you remove any non-directory files from the node_modules directory, your currently installed npm should work fine. (For .gitignore, you may want to consider using the .gitignore one directory up, in the base of your project). You could also try using my fork of npm in the meantime, but that's up to you.

@alexeyten This has been fixed in #3072 now.


Has this issue been fixed? Can it be closed now?


@CodeMangler It's been fixed and can be closed.

@domenic domenic closed this

Having this problem again today, anybody else?


Ya, got it this evening. node: v0.10.29, npm: 1.4.14, osx. Clearing the node_modules folder, running via sudo npm install -dd has shown that npm is active now. I did at one point Ctrl-c the thing, which seems to lead to this symptom as described elsewhere


@cdaringe npm 1.4.14 is a little out of date, can you check on npm 1.4.23? I couldn't repro this on 1.4.23 with the same repro steps as before (as outlined in #3072).

@GeoffreyPlitt Same question, can you let me know if you have an environment and file structure similar to outlined in #3072?


@CarlQLange My repo didn't have a node_modules directory checked in, no.

@othiym23 othiym23 added the support label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.