无法parsingpackage.json:npm install

当我发出“$ npm install”时,package.json不会被parsing。

我在ubuntu 14.04上使用NPM版本v2.11.2。

的package.json

{ "name": "sockjs-express", "version": "0.0.0-unreleasable", "dependencies": { "express": "~3*", "sockjs": "*", "hiredis": "*", "redis": "*" } } 

以下错误报告:

 :~/sfax/djangotest/sockjs_serv$ sudo npm install npm ERR! install Couldn't read dependencies npm ERR! Linux 3.13.0-48-generic npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--production" npm ERR! node v0.12.5 npm ERR! npm v2.11.2 npm ERR! file /home/ubuntu/sfax/djangotest/sockjs_serv/package.json npm ERR! code EJSONPARSE npm ERR! Failed to parse json npm ERR! Unexpected token '/' at 9:10 npm ERR! "/home/ubuntu/sfax/djangotest/sockjs_serv/npm-debug.log", npm ERR! ^ npm ERR! File: /home/ubuntu/sfax/djangotest/sockjs_serv/package.json npm ERR! Failed to parse package.json data. npm ERR! package.json must be actual JSON, not just JavaScript. npm ERR! npm ERR! This is not a bug in npm. npm ERR! Tell the package author to fix their package.json file. JSON.parse npm ERR! Please include the following file with any support request: npm ERR! /home/ubuntu/sfax/djangotest/sockjs_serv/npm-debug.log 

无法得到我错在哪里。

版本必须由node-semverparsing,node-semver与npm捆绑为一个依赖项。 (npm安装semver自己使用它。)

您的版本号express错误。 您可以使用*代替一个或多个版本号; 即; 3.0.*匹配版本3的任何次要版本,但它不能代替.