error when type 'sudo npm install -g meteorite'
Asked Answered
S

1

1

I'm trying to install the meteorite. I've success to install nodejs(v0.10.7).and when I type 'sudo npm install -g meteorite'. It comes the error below. I think it may exist some problem with npm(1.2.21). But I do not how to solve it. And I use ubuntu12.10 64bit. Any ideas?

npm http GET https://registry.npmjs.org/meteorite

npm http 304 https://registry.npmjs.org/meteorite

npm ERR! Error: ENOTDIR, mkdir '/home/icarus/tmp/npm-5885/1369411459617-0.27502001402899623'

npm ERR! If you need help, you may report this log at:

npm ERR! or email it to:

npm ERR! [email protected]

npm ERR! System Linux 3.5.0-17-generic

npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "meteorite"

npm ERR! cwd /home/icarus

npm ERR! node -v v0.10.7

npm ERR! npm -v 1.2.21

npm ERR! not ok code 0

Stepfather answered 24/5, 2013 at 17:11 Comment(4)
Check out this question: https://mcmap.net/q/341560/-npm-install-error-enotdirSelaginella
I follow this link(#13453291 by @tymeJV. And I follow the way that type 'rm ~/tmp' to remove the file. Then I install meteorite again. It works! Thinks a lot.Stepfather
guys, post an answer @Selaginella or mark it as duplicate. ThanksCalfskin
oh, sorry. I am new here. I have marked it as duplicate.Stepfather
M
2

For those who landed here first like me, this is usually an issue with a tmp folder in your root directory followed by npm trying to install from the cache. This should fix it:

rm -rf ~/tmp
sudo npm cache clear
sudo npm install -g meteorite

If you still get the ENOTDIR error you can try making the directory yourself, clearing the cache, and reinstalling, but it looks like removing the tmp folder usually does the trick.

Props to Coombesy for posting this solution here.

Mayor answered 2/10, 2013 at 21:38 Comment(1)
It is NOT recommended to use sudo npm --#25291486Legwork

© 2022 - 2024 — McMap. All rights reserved.