Ubuntu 自带的 npm 安装 LiveScript出错[解决..]
发布于 12 年前 作者 jiyinyiyong 5973 次浏览 最后一次编辑是 8 年前
chen[@YX](/user/YX):~$ sudo npm install -g LiveScript
npm http GET https://registry.npmjs.org/LiveScript
npm http 304 https://registry.npmjs.org/LiveScript

npm ERR! Error: No compatible version found: LiveScript
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/chen/npm-debug.log npm
npm ERR! 
npm ERR! System Linux 3.2.0-23-generic-pae
npm ERR! command "node" "/usr/bin/npm" "install" "-g" "LiveScript"
npm ERR! cwd /home/chen
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message No compatible version found: LiveScript
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/chen/npm-debug.log
npm not ok
chen[@YX](/user/YX):~$ npm config list
; cli configs

; builtin config /usr/share/npm/npmrc
# DO NOT MODIFY THIS FILE - use /etc/npmrc instead. = true
globalconfig = "/etc/npmrc"
globalignorefile = "/etc/npmignore"
prefix = "/usr/local"

; node install prefix = undefined
; node bin location = /usr/bin/node
; cwd = /home/chen
; HOME = /home/chen
; 'npm config ls -l' to show all defaults.
chen[@YX](/user/YX):~$ node -v
v0.6.12
chen[@YX](/user/YX):~$ npm -v
1.1.4

这个 Node 是 12.10 apt-get 直接安装的, 以前我用都是用 PPA 版本所以没遇到 检查这个包其实是有的… 同个局域网里的我的 Arch 安装成功了 我对比了下 Arch 上的配置, 难道是 prefix 之类参数的问题么?

➤➤ npm config list
; cli configs
registry = "https://registry.npmjs.org/"

; node bin location = /usr/bin/node
; cwd = /home/chen
; HOME = /home/chen
; 'npm config ls -l' to show all defaults.

哪位有遇到过 Ubuntu 上类似的问题么?

1 回复

Ubuntu 12.04 自带 nodejs 版本太低… 这种事情…

回到顶部