需要更改此package.json文件才能使用npm 0.3.0? [英] What needs to change in this package.json file to work with npm 0.3.0?

查看:121
本文介绍了需要更改此package.json文件才能使用npm 0.3.0?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试使用lib但收到此错误...

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.

不确定为使其成为有效的JSON可能需要做哪些更改,非常感谢!

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

推荐答案

有效的JSON必须包含引号中对象的键和值。用引号括住所有键,这样可以使错误消失。

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.

参考: JSON规范

更新:我为你做了肮脏的工作。如果有问题,请告诉我。

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"
  }
}

这篇关于需要更改此package.json文件才能使用npm 0.3.0?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆