npm安装时出错解决

我在安装coffeescript的时候 报错

$ npm install grunt-cli

npm ERR! Not a package /tmp/npm-1392715299151/1392715299152-0.6465556398034096/tmp.tgz

npm ERR! couldn't unpack /tmp/npm-1392715299151/1392715299152-0.6465556398034096/tmp.tgz to /tmp/npm-1392715299151/1392715299152-0.6465556398034096

npm http GET http://registry.npmjs.org/grunt-cli

npm http 304 http://registry.npmjs.org/grunt-cli

 

npm ERR! Error: No compatible version found: grunt-cli

npm ERR! No valid targets found.

npm ERR! Perhaps not compatible with your version of node?

npm ERR!     at installTargetsError (/usr/share/npm/lib/cache.js:488:10)

npm ERR!     at next_ (/usr/share/npm/lib/cache.js:438:17)

npm ERR!     at next (/usr/share/npm/lib/cache.js:415:44)

npm ERR!     at /usr/share/npm/lib/cache.js:408:5

npm ERR!     at saved (/usr/share/npm/lib/utils/npm-registry-client/get.js:147:7)

npm ERR!     at Object.oncomplete (/usr/lib/nodejs/graceful-fs.js:230:7)

npm ERR! You may report this log at:

npm ERR!     <http://bugs.debian.org/npm>

npm ERR! or use

npm ERR!     reportbug --attach /home/sf/IdeaProjects/omp2/OMPII/hindi/shiva/npm-debug.log npm

npm ERR! 

npm ERR! System Linux 3.8.0-35-generic

npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "grunt-cli"

npm ERR! cwd /home/sf/IdeaProjects/omp2/OMPII/hindi/shiva

npm ERR! node -v v0.6.19

npm ERR! npm -v 1.1.4

npm ERR! message No compatible version found: grunt-cli

npm ERR! message No valid targets found.

npm ERR! message Perhaps not compatible with your version of node?

npm ERR! 

npm ERR! Additional logging details can be found in:

npm ERR!     /home/sf/IdeaProjects/omp2/OMPII/hindi/shiva/npm-debug.log

npm not ok

 

网上各种办法都试过了,最后没有办法了,下载最新版的npm安装,然后再执行上述命令则成功了。

 

 

 

$ npm install grunt-cli  

可能遇见第二个问题 :

Downloading http://cdn.bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2

Saving to /tmp/phantomjs/phantomjs-1.9.7-linux-x86_64.tar.bz2

会一直卡住在这一步 ,

解决方式:

   1、中断该操作

   2、网上另找地方下载 phantomjs-1.9.7-linux-x86_64.tar.bz2

    4、把上面下载的压缩包copy到 /tmp/phantomjs/

    5、重新执行安装命令即可

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值