我有 package.json
文件,其中提到了以下 devDependencies:
"devDependencies": {
"bower": "^1.7.7",
"connect-ssi": "^1.1.0",
"grunt": "~0.4.5",
"grunt-contrib-compass": "^1.1.0",
"grunt-contrib-concat": "~0.4.0",
"grunt-contrib-connect": "^0.11.2",
"grunt-contrib-handlebars": "^0.11.0",
"grunt-contrib-jshint": "~0.10.0",
"grunt-contrib-qunit": "~0.5.2",
"grunt-contrib-sass": "^0.9.2",
"grunt-contrib-uglify": "~0.5.0",
"grunt-contrib-watch": "~0.6.1",
"grunt-jsdoc": "^1.1.0",
"karma": "^0.13.22",
"karma-jasmine": "^0.3.7"
}
现在,当我运行 npm install
时,出现以下错误:
UNMET PEER DEPENDENCY jasmine-core@* npm WARN EPEERINVALID karma-jasmine@0.3.8 requires a peer of jasmine-core@* but none was installed. npm WARN EPACKAGEJSON hirebuddy-prototype@0.0.1 No repository field.
hirebuddy-prototype
是 package.json 中的名称。
将运行 npm install
安装 package.json 中提到的所有依赖项,还是我需要安装 jasmine-core
和 karma-jasmine
分开?
最佳答案
这是 karma-jasmine 的弱点。在其 package.json 中,jasmine-core
被列为 peerDependency,NPM 3 不再自动安装这些。所以你必须在你自己的 package.json 中添加 jasmine-core
。所以只需 npm install jasmine-core --save-dev
,并祈祷最新版本兼容。应该是。
关于json - 由于未满足对等依赖项,无法成功运行 npm install,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36218661/