我正在尝试创建我的grunt构建,但坚持跟随错误
npm WARN package.json Dependency 'grunt' exists in both dependencies and devDependencies, using 'grunt@~0.4.2' from dependencies
npm ERR! Darwin 13.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package grunt does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer grunt-contrib-requirejs@0.4.4 wants grunt@~0.4.0
npm ERR! peerinvalid Peer grunt-config@0.1.8 wants grunt@~0.4.0
npm ERR! peerinvalid Peer grunt-string-replace@0.2.8 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-cssmin@0.10.0 wants grunt@~0.4.1
npm ERR! peerinvalid Peer grunt-contrib-jshint@0.11.0 wants grunt@~0.4.5
npm ERR! peerinvalid Peer grunt-contrib-uglify@0.8.0 wants grunt@>=0.4.0
npm ERR! peerinvalid Peer grunt-exec@0.4.6 wants grunt@~0.4
正如here所提到的,我卸载了我的节点,npm和grunt并重新安装它们但仍面临同样的问题?
任何的想法 ?
我的JSON依赖项是:
"dependencies": {
"grunt": "~0.4.2",
"grunt-contrib-requirejs": "~0.4.1",
"grunt-config": "~0.1.4",
"grunt-string-replace": "~0.2.7",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-cssmin": "~0.10.0"
},
"devDependencies": {
"grunt": "0.4.2",
"grunt-cli": "0.1.13",
"grunt-contrib-jshint": ">0.8.0",
"grunt-contrib-uglify": ">0.3.2",
"load-grunt-tasks": ">=0.3.0",
"requirejs": ">=2.1.10",
"grunt-exec": "~0.4.5"
}
同样的事情对我的同事来说也很好.
解决方法:
今天我有类似的错误,并通过升级npm修复它:
npm install -g npm
我有2.14版本,升级后它变成了3.8
标签:javascript,node-js,gruntjs 来源: https://codeday.me/bug/20190623/1275336.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。