1

我正在关注 testatcular 视频教程http://vojtajina.github.com/testacular/

我安装了 nodejs,当我尝试安装 testacular 时

sudo npm install -g testacular 我收到此错误:

npm http GET https://registry.npmjs.org/testacular
npm http 304 https://registry.npmjs.org/testacular
npm http GET https://registry.npmjs.org/chokidar
npm http GET https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/socket.io
npm http GET https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/optimist
npm http 304 https://registry.npmjs.org/glob
npm http 304 https://registry.npmjs.org/socket.io
npm http 304 https://registry.npmjs.org/optimist
npm http 304 https://registry.npmjs.org/chokidar
npm http 304 https://registry.npmjs.org/minimatch

> chokidar@0.4.0 postinstall /usr/local/lib/node_modules/testacular/node_modules/chokidar
> node setup.js postinstall

npm ERR! error installing chokidar@0.4.0
npm WARN This failure might be due to the use of legacy binary "node" 
npm WARN For further explanations, please read
npm WARN /usr/share/doc/nodejs/README.Debian
npm WARN 
npm ERR! error installing testacular@0.0.17

npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/testacular/node_modules/___minimatch.npm/package/minimatch.js'
npm ERR! You may report this log at:
npm ERR!     <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR!     reportbug --attach /home/adio/workspace/java/tutorial/angularJS/npm-debug.log npm
npm ERR! 
npm ERR! System Linux 3.5.0-17-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "testacular"
npm ERR! cwd /home/adio/workspace/java/tutorial/angularJS
npm ERR! node -v v0.6.19
npm ERR! npm -v 1.1.4
npm ERR! path /usr/local/lib/node_modules/testacular/node_modules/___minimatch.npm/package/minimatch.js
npm ERR! fstream_path /usr/local/lib/node_modules/testacular/node_modules/___minimatch.npm/package/minimatch.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! message ENOENT, lstat '/usr/local/lib/node_modules/testacular/node_modules/___minimatch.npm/package/minimatch.js'
npm ERR! errno {}
npm ERR! fstream_stack Object.oncomplete (/usr/lib/nodejs/fstream/lib/writer.js:204:26)
npm ERR! error rolling back testacular@0.0.17 Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/testacular/node_modules/___glob.npm/package/test'

npm ERR! chokidar@0.4.0 postinstall: `node setup.js postinstall`
npm ERR! `sh "-c" "node setup.js postinstall"` failed with 1
npm ERR! 
npm ERR! Failed at the chokidar@0.4.0 postinstall script.
npm ERR! This is most likely a problem with the chokidar package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node setup.js postinstall
npm ERR! You can get their info via:
npm ERR!     npm owner ls chokidar
npm ERR! There is likely additional logging output above.
npm ERR! 
npm ERR! System Linux 3.5.0-17-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "testacular"
npm ERR! cwd /home/adio/workspace/java/tutorial/angularJS
npm ERR! node -v v0.6.19
npm ERR! npm -v 1.1.4
npm ERR! code ELIFECYCLE
npm ERR! message chokidar@0.4.0 postinstall: `node setup.js postinstall`
npm ERR! message `sh "-c" "node setup.js postinstall"` failed with 1
npm ERR! errno {}
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/adio/workspace/java/tutorial/angularJS/npm-debug.log
npm not ok

有人遇到这个问题吗?

提前感谢您的帮助。

4

2 回答 2

1

让我猜猜,它是否发生在 64 位 Win7 机器上?

我得到了同样的错误,它已经在testacular github上报告了

我发现的唯一解决方法是安装 node.js 32 位而不是 64 位版本。我鼓励你在他们的 github 上发表另一条评论,所以也许会重新考虑

于 2012-11-05T11:29:27.837 回答
0

正如错误日志所暗示的那样,问题出在版本中。在 Ubuntu 12.10 上使用 sudo apt-get install nodejs 安装 NodeJS 将导致安装 nodejs 0.6,但您需要 nodejs 版本 0.8 来安装 testacular 所以我按照本教程安装 nodejs 0.8

http://davidtsadler.com/archives/2012/05/06/installing-node-js-on-ubuntu/
于 2012-11-05T16:11:07.940 回答