Ami*_*oun 5 node.js package.json
写作时package.json:
"scripts": {
"preinstall": "npm install -g grunt-cli"
},
"devDependencies": {
"async": "^0.9.0",
"grunt": "^0.4.5",
"grunt-contrib-connect": "^0.9.0",
"grunt-contrib-cssmin": "^0.10.0",
"grunt-contrib-jshint": "^0.10.0",
"grunt-contrib-uglify": "^0.6.0",
"grunt-contrib-watch": "^0.6.1",
"jit-grunt": "^0.9.0",
"marked": "^0.3.2",
"time-grunt": "^1.0.0",
"underscore": "^1.7.0"
}
然后运行命令 npm install
它适用于某些计算机,但有些我得到这个错误:http: //pastebin.com/rYUwhV5k
是正确使用的package.json吗?还有其他办法吗?如何解决其他计算机上出现的问题?
根据 npm 文档“注意:安装脚本是反模式” https://docs.npmjs.com/misc/scripts
在你的情况下,最好只是在 readme.md 中添加你需要安装 grunt 来运行测试(并让用户决定如何安装它)
| 归档时间: |
|
| 查看次数: |
4111 次 |
| 最近记录: |