node.js - npm 安装 jasmine-jquery 失败

标签 node.js npm jasmine jasmine-jquery

运行npm install jasmine-jquery会给出如下错误输出。 我运行的是 Windows 7。有什么想法吗?

npm install jasmine-jquery
npm http GET https://registry.npmjs.org/jasmine-jquery
npm http 304 https://registry.npmjs.org/jasmine-jquery
npm http GET https://registry.npmjs.org/jsdom
npm http 304 https://registry.npmjs.org/jsdom
npm http GET https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/cssom
npm http GET https://registry.npmjs.org/contextify
npm http GET https://registry.npmjs.org/htmlparser
npm http 304 https://registry.npmjs.org/cssom
npm http 304 https://registry.npmjs.org/htmlparser
npm http 304 https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/contextify

> contextify@0.0.7 preinstall C:\node\node_modules\jasmine-jquery\node_modules\jsdom\node_modules\contextify
> node-waf clean || (exit 0); node-waf configure build

Oväntat node-waf.
npm ERR! error installing contextify@0.0.7
npm ERR! error installing jsdom@0.2.10
npm ERR! Error: ENOENT, no such file or directory 'C:\node\node_modules\jasmine-jquery\node_modules\jsdom\node_modules\___htmlparser.npm\package\runtests.min.js'
npm ERR! Report this *entire* log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
npm ERR!
npm ERR! System Windows_NT 6.1.7600
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "jasmine-jquery"
npm ERR! cwd C:\node\messagemetrics
npm ERR! node -v v0.6.6
npm ERR! npm -v 1.1.0-beta-4
npm ERR! path C:\node\node_modules\jasmine-jquery\node_modules\jsdom\node_modules\___htmlparser.npm\package\runtests.min.js
npm ERR! fstream_path C:\node\node_modules\jasmine-jquery\node_modules\jsdom\node_modules\___htmlparser.npm\package\runtests.min.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! message ENOENT, no such file or directory 'C:\node\node_modules\jasmine-jquery\node_modules\jsdom\node_modules\___htmlparser.npm\package\runtests.min.js'
npm ERR! fstream_stack Object.oncomplete (C:\Program Files\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:204:26)
npm ERR! error rolling back jsdom@0.2.10 Error: UNKNOWN, unknown error 'C:\node\node_modules\jasmine-jquery\node_modules\jsdom\node_modules\___request.npm\package\tests'
npm ERR! error installing jasmine-jquery@1.3.3
npm ERR! error rolling back jasmine-jquery@1.3.3 Error: UNKNOWN, unknown error 'C:\node\node_modules\jasmine-jquery\node_modules\jsdom\node_modules\___request.npm\package'
npm ERR! contextify@0.0.7 preinstall: `node-waf clean || (exit 0); node-waf configure build`
npm ERR! `cmd "/c" "node-waf clean || (exit 0); node-waf configure build"` failed with 1
npm ERR!
npm ERR! Failed at the contextify@0.0.7 preinstall script.
npm ERR! This is most likely a problem with the contextify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-waf clean || (exit 0); node-waf configure build
npm ERR! You can get their info via:
npm ERR!     npm owner ls contextify
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Windows_NT 6.1.7600
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "jasmine-jquery"
npm ERR! cwd C:\node\messagemetrics
npm ERR! node -v v0.6.6
npm ERR! npm -v 1.1.0-beta-4
npm ERR! code ELIFECYCLE
npm ERR! message contextify@0.0.7 preinstall: `node-waf clean || (exit 0); node-waf configure build`
npm ERR! message `cmd "/c" "node-waf clean || (exit 0); node-waf configure build"` failed with 1
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\node\messagemetrics\npm-debug.log
npm not ok

最佳答案

您尝试过使用 sudo 吗? 这对我有用: sudo npm install jasmine-jquery,让我知道这是否适合您。

关于node.js - npm 安装 jasmine-jquery 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9210887/

相关文章:

javascript - 更新到 Node 10-alpine 后 - ERR_STREAM_CANNOT_PIPE

javascript - 如何本地化用户并显示我网站的优质版本

angular - 将 css-element-queries 导入到 Angular 6 应用程序

node.js - 部署 Meteor 应用程序时重建 npm 模块

javascript - ReactJS + MySQL 无法使用 api 创建新对象

node.js - 无法安装 NodeJs :/usr/bin/env: node: No such file or directory

node.js - npm 启动失败,events.js :174 throw err; on Ubuntu 18. 04

JavaScript Jasmine 单元测试覆盖率

unit-testing - 如何让 jasmine 模拟数组的值?

junit - 如何从运行 grunt jasmine 中获取 xml 输出