node.js - 安装睾丸时出错

标签 node.js angularjs karma-runner

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

我安装了nodejs,当我尝试使用

安装 testaulous 时

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

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

有人遇到过这个问题吗?

提前感谢您的帮助。

最佳答案

让我猜猜,这是发生在Win7 64位机器上吗?

我遇到了同样的错误,并且已在 testacular github 上报告了该错误

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

关于node.js - 安装睾丸时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13219435/

相关文章:

javascript - ng-submit 不会触发事件

javascript - angular.js 过滤器中的嵌套列表

Java REST HTTP POST 在curl 中有效,但在AngularJS 中无效

javascript - Jasmine spy jquery

node.js - 以编程方式控制 Jetbrains 内置服务器

node.js - 在 Docker 容器内调试 webpack-dev-server 应用程序

javascript - 如何仅更改对象中键的第一个实例

javascript - Next.js - 使用 Clouflare Workers 进行无服务器渲染?

angularjs - 似乎无法让 'karma-ng-html2js-preprocessor' 完成工作

unit-testing - ng 测试 - 意外 token 'const'