关注this教程我想用karma进行测试。当我安装karma和gulp-karma时,我收到以下错误消息。它说没有安装karma@1.3.0,这是gulp-karma所需要的。当我安装业力时它会说同样的话。
现在,我无法确定它是否安装正确。
我试图删除node_modules目录,清除chache,升级npm并从头开始,结果是一样的。
npm版本:3.10.8
的package.json:
{
"name": "ui.spa",
"version": "1.0.0",
"description": "Framework module for Digital Library",
"main": "Gulpfile.js",
"dependencies": {
"bower": "^1.7.9",
"gulp": "^3.9.1",
"gulp-clean": "^0.3.2",
"gulp-inject": "^4.1.0",
"gulp-karma": "0.0.5",
"gulp-typescript": "^2.14.1",
"gulp-util": "^3.0.7",
"jasmine": "^2.5.2",
"jasmine-core": "^2.5.2",
"karma": "^1.3.0",
"karma-coverage": "^1.1.1",
"karma-jasmine": "^1.0.2",
"karma-phantomjs-launcher": "^1.0.2",
"merge-stream": "^1.0.0",
"phantomjs": "^2.1.7",
"require-dir": "^0.3.0",
"run-sequence": "^1.2.2",
"stream-series": "^0.1.1",
"typings": "^1.4.0"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
}
C:\项目\ sayusiando.visualstudio.com_git \数字图书馆\ SRC \框架\ Framework.UI.Spa> NPM 安装karma --save ui.spa@1.0.0 C:\项目\ sayusiando.visualstudio.com_git \数字图书馆的\ src \框架\ Framework.UI.Spa ` - UNMET PEER DEPENDENCY karma@1.3.0
npm WARN可选SKIPPING OPTIONAL DEPENDENCY:fsevents@^1.0.0 (node_modules \ chokidar \ node_modules \ fsevents):npm WARN notsup 跳过可选的依赖性:不支持的平台 fsevents@1.0.14:want {“os”:“darwin”,“arch”:“any”}(当前: {“os”:“win32”,“arch”:“x64”})npm WARN gulp-karma@0.0.5需要同行 of karma @> = 0.10< = 0.13但没有安装。 npm WARN ui.spa@1.0.0 没有存储库字段。错误的ERR!代码1
C:\项目\ sayusiando.visualstudio.com_git \数字图书馆\ SRC \框架\ Framework.UI.Spa> NPM 安装gulp-karma --save ui.spa@1.0.0 C:\项目\ sayusiando.visualstudio.com_git \数字图书馆的\ src \框架\ Framework.UI.Spa + - gulp-karma@0.0.5`- UNMET PEER DEPENDENCY karma@1.3.0
npm WARN可选SKIPPING OPTIONAL DEPENDENCY:fsevents@^1.0.0 (node_modules \ chokidar \ node_modules \ fsevents):npm WARN notsup 跳过可选的依赖性:不支持的平台 fsevents@1.0.14:want {“os”:“darwin”,“arch”:“any”}(当前: {“os”:“win32”,“arch”:“x64”})npm WARN gulp-karma@0.0.5需要同行 of karma @> = 0.10< = 0.13但没有安装。 npm WARN ui.spa@1.0.0 没有存储库字段。
C:\项目\ sayusiando.visualstudio.com_git \数字图书馆\ SRC \框架\ Framework.UI.Spa>