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

前端 未结 6 586
时光取名叫无心
时光取名叫无心 2021-01-04 23:33

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 actua         


        
6条回答
  •  梦谈多话
    2021-01-04 23:52

    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": "bob@embed.ly"
      , "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"
      }
    }
    

提交回复
热议问题