简体   繁体   English

问题是package.json吗?

[英]Problem is package.json?

What could be wrong here? 这有什么问题吗?

/opt/local/lib/node/.npm/embedly/0.3.2/package/package.json:1
"name": "embedly
      ^

node.js:134
        throw e; // process.nextTick error, or 'error' event on first tick
        ^
13 Apr 02:23:06 - [ERROR] SyntaxError
SyntaxError: Unexpected token :

package.json package.json

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

Many things could be wrong there actually, are you sure the .json you receive is formatted correctly? 实际上,很多事情可能是错误的,您确定收到的.json格式正确吗? It looks to me that you're missing a double quote, but maybe I'm wrong. 在我看来,您缺少双引号,但也许我错了。

This error is thrown from the statement 该语句引发此错误

_package = require('embedly/package.json')

It's a bug and I'll have it fixed shortly. 这是一个错误,我会尽快修复。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM