Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What needs to change in this package.json file to work with npm 0.3.0?

Trying to use a lib but getting this error...

npm ERR! JSON.parse Failed to parse package.json data.
npm ERR! JSON.parse Note that package.json must be actual JSON, not
npm ERR! JSON.parse just a JavaScript object.
npm ERR! JSON.parse 
npm ERR! JSON.parse This changed in npm 0.3.0, and is not a bug in npm.
npm ERR! JSON.parse Tell the package author to fix their package.json file.

Not sure what changes are likely needed to make it valid JSON, thanks very much!

like image 870
fancy Avatar asked Apr 13 '11 04:04

fancy


2 Answers

Super cool way to fix / validate the package.json :

node package.json

and you have your json validated or the error line.

Why use jsonlint, sounds pretty lame.

like image 74
Barun Avatar answered Oct 13 '22 00:10

Barun


Just to complete the answer, you can simply use an online JSON validator to validate your package.json.
I highly recommend http://jsonlint.com/, paste your package.json in the textarea and click on the Validate button, that's all!

like image 41
Afshin Mehrabani Avatar answered Oct 13 '22 00:10

Afshin Mehrabani