I wanted my Package.json to be something like this
{
"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"
}
}
I tried this using npm install but got this error
package.json must be actual JSON, not just JavaScript.
So I used command line to create json, and added dependencies. What I found was that most of the packages were installed without giving this errors, and also my package.json got updated correctly by using npm install grunt-contrib-watch --save-dev and so on.
On Windows I am seeing this error only for two packages: for grunt-contrib-uglify" as well as grunt-contrib-handlebars. So my JSON file is ending with
{
"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"
}
}
Seems like there is an error in your package.json. The one in C:\Users\zm2759\AppData\Roaming\npm-cache\wordwrap\0.0.2\package\package.json. Since it is inside npm-cache, I believe you can clear it with npm cache clean.
Otherwise there seems to be no problem with your own package.json.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With