Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
70
rated 0 times [  72] [ 2]  / answers: 1 / hits: 26654  / 13 Years ago, wed, april 13, 2011, 12:00:00

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!


More From » json

 Answers
133

Valid JSON must have both keys and values of an object in quotes. Surround all of your keys in quotation marks and that should make the error go away.



Reference: JSON spec



Update: I did the dirty work for you. Let me know if this fixes it.



{ name: embedly
, version: 0.3.2
, description: Embedly client library for node
, homepage: https://github.com/embedly/embedly-node
, keywords: []
, author:
{ name: Bob Corsaro
, email: [email protected]
, url: http://www.google.com/profiles/rcorsaro
}
, repository:
{ type: git
, url: git://github.com/embedly/embedly-node
}
, bugs: { web: http://github.com/embedly/embedly-node/issues/ }
, directories:
{ doc: ./docs
, lib: ./lib
, test: ./test
}
, dependencies: {hashish: , qs: }
, devDependencies: {vows: >= 0.5.6}
, main: ./lib/embedly.js
, scripts: { test: vows }
, bin:
{ embedly_oembed: bin/embedly_oembed.js
, embedly_objectify: bin/embedly_objectify.js
, embedly_preview: bin/embedly_preview.js
}
}

[#92767] Tuesday, April 12, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
mariamiyanab

Total Points: 75
Total Questions: 102
Total Answers: 92

Location: British Indian Ocean Territory
Member since Tue, Feb 22, 2022
2 Years ago
;