我在安装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、重新执行安装命令即可
?