Node.js   发布时间:2022-04-24  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了node.js – 引导程序中的Grunt依赖性冲突大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我从 official website下载了Bootstrap源文件,当使用节点的npm安装项目时,我得到了依赖冲突。我有grunt 0.4.3安装在我的机器上,但一些bootstrap依赖需要0.4.0和一些0.4.1。

npm install -g grunt-cli命令执行时没有任何问题。这是我在执行npm install命令后得到的日志:

npm ERR! peerinvalid The package grunt does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer grunt-bAnner@0.2.1 wants grunt@~0.4.1
npm ERR! peerinvalid Peer grunt-contrib-clean@0.5.0 wants grunt@~0.4.0
npm ERR! peerinvalid Peer grunt-contrib-concat@0.3.0 wants grunt@~0.4.0
npm ERR! peerinvalid Peer grunt-contrib-connect@0.6.0 wants grunt@~0.4.0
npm ERR! peerinvalid Peer grunt-contrib-copy@0.5.0 wants grunt@~0.4.0
npm ERR! peerinvalid Peer grunt-contrib-csslint@0.2.0 wants grunt@~0.4.0
npm ERR! peerinvalid Peer grunt-contrib-cssmin@0.7.0 wants grunt@~0.4.1
npm ERR! peerinvalid Peer grunt-contrib-jade@0.9.1 wants grunt@~0.4.1
npm ERR! peerinvalid Peer grunt-contrib-jshint@0.8.0 wants grunt@~0.4.0
npm ERR! peerinvalid Peer grunt-contrib-less@0.9.0 wants grunt@~0.4.0
npm ERR! peerinvalid Peer grunt-contrib-qunit@0.4.0 wants grunt@~0.4.0
npm ERR! peerinvalid Peer grunt-contrib-uglify@0.3.3 wants grunt@~0.4.0
npm ERR! peerinvalid Peer grunt-contrib-watch@0.5.3 wants grunt@~0.4.0
npm ERR! peerinvalid Peer grunt-csscomb@2.0.1 wants grunt@~0.4.2
npm ERR! peerinvalid Peer grunt-exec@0.4.3 wants grunt@~0.4
npm ERR! peerinvalid Peer grunt-html-validation@0.1.13 wants grunt@~0.4.1
npm ERR! peerinvalid Peer grunt-jekyll@0.4.1 wants grunt@~0.4.1
npm ERR! peerinvalid Peer grunt-jscs-checker@0.3.2 wants grunt@0.4.2
npm ERR! peerinvalid Peer grunt-saucelabs@5.0.1 wants grunt@~0.4.1
npm ERR! peerinvalid Peer grunt-sed@0.1.1 wants grunt@~0.4

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd C:\Users\\Desktop\bootstrap-3.1.1
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.3.5
npm ERR! code EPEERINVALID
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\\Desktop\bootstrap-3.1.1\npm-debug.log
npm ERR! not ok @R_285_6756@

我按照these安装步骤。

如何清洁地安装此项目,没有任何错误

解决方法

我今天早上碰到这个问题。我最终改变了第30行在Bootstrap的package.json文件:从“〜0.4.2”到“0.4.2”:

27  "devDependencies": {
...
30    "grunt" : "0.4.2"

这意味着0.4.3不再匹配依赖关系规范,但它也意味着您不会以后安装新版本的grunt。这足以让事情工作,但你应该可能最终改变它(也许在你的一个引导项目离开它)。

大佬总结

以上是大佬教程为你收集整理的node.js – 引导程序中的Grunt依赖性冲突全部内容,希望文章能够帮你解决node.js – 引导程序中的Grunt依赖性冲突所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。