在我尝试获取我需要的库时,npm install运行良好直到大约一年,现在当我移动到新服务器时,它打破了说明PeerDependencies错误。我有点困惑,因为我失败了代码破坏的原因,任何人都遇到了类似的问题,这可能不是因为旧版本的库预先全局安装,因为我完全转移到新的服务器。这里的任何帮助将非常感激。
错误
npm ERR! Linux 3.13.0-49-generic
npm ERR! argv "node" "/usr/bin/npm" "install"
npm ERR! node v0.10.37
npm ERR! npm v2.10.1
npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package karma does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer karma-requirejs@0.2.2 wants karma@>=0.9
npm ERR! peerinvalid Peer karma-mocha@0.1.10 wants karma@>=0.12.8
npm ERR! peerinvalid Peer karma-html2js-preprocessor@0.1.0 wants karma@>=0.9
npm ERR! peerinvalid Peer karma-jasmine@0.1.5 wants karma@>=0.9
npm ERR! peerinvalid Peer karma-ng-html2js-preprocessor@0.1.2 wants karma@>=0.9
npm ERR! peerinvalid Peer karma-ng-scenario@0.1.0 wants karma@>=0.9
npm ERR! peerinvalid Peer karma-script-launcher@0.1.0 wants karma@>=0.9
npm ERR! peerinvalid Peer grunt-karma@0.6.2 wants karma@~0.10.0
npm ERR! peerinvalid Peer karma-coffee-preprocessor@0.1.3 wants karma@>=0.9
npm ERR! peerinvalid Peer karma-phantomjs-launcher@0.1.4 wants karma@>=0.9
谢谢
答案 0 :(得分:1)
您需要使用相应版本的npm软件包更新package.json
文件。首先运行sudo npm uninstall
卸载,然后更新package.json
。
运行npm list
以检查为项目安装的软件包的版本。尝试通过提供类似
sudo npm uninstall karma@version.no