error when type 'sudo npm install -g meteorite'

被刻印的时光 ゝ 提交于 2019-12-11 10:53:28

问题


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? Thinks a lot.

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!

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


回答1:


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.



来源:https://stackoverflow.com/questions/16740284/error-when-type-sudo-npm-install-g-meteorite

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!