Zam*_*med 3 windows node.js gruntjs grunt-contrib-uglify
我希望我的Package.json是这样的
{
"name": "Billing",
"version": "0.0.0",
"dependencies": {
"grunt": "~0.4.1",
"grunt-contrib-watch": "~0.5.3",
"grunt-contrib-compass": "~0.5.0",
"grunt-contrib-uglify": "~0.2.2",
"grunt-contrib-cssmin": "~0.6.2",
"matchdep": "~0.1.2"
},
"devDependencies": {
"grunt-contrib-handlebars": "~0.5.4",
"grunt-contrib-less": "~0.8.1"
}
}
Run Code Online (Sandbox Code Playgroud)
我试过这个npm install但是得到了这个错误
package.json必须是实际的JSON,而不仅仅是JavaScript.
所以我使用命令行来创建json,并添加了依赖项.我发现大多数软件包都是在没有出现这种错误的情况下安装的,而且我的package.json也通过使用npm install grunt-contrib-watch --save-dev等方式得到了正确的更新.
在Windows上我看到这个错误仅针对两个包:对于grunt-contrib-uglify"以及grunt-contrib-handlebars.所以我的JSON文件结束于
{
"name": "Billing",
"version": "0.0.0",
"dependencies": {
"grunt": "~0.4.1",
"grunt-contrib-watch": "~0.5.3",
"grunt-contrib-compass": "~0.5.0",
"grunt-contrib-cssmin": "~0.6.2",
"matchdep": "~0.1.2"
},
"devDependencies": {
"grunt-contrib-less": "~0.8.1"
}
}
Run Code Online (Sandbox Code Playgroud)
好像你的package.json中有一个错误.一个在C:\Users\zm2759\AppData\Roaming\npm-cache\wordwrap\0.0.2\package\package.json.因为它在npm-cache中,所以我相信你可以用它来清除它npm cache clean.
否则你自己似乎没有问题package.json.
| 归档时间: |
|
| 查看次数: |
2409 次 |
| 最近记录: |