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:
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 firstname.lastname@example.org
3 info using email@example.com
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 <http://github.com/isaacs/npm/issues>
7 error or email it to:
7 error <firstname.lastname@example.org>
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.
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
sudo npm install -dd
@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.