关于express安装的问题
发布于 3个月前 作者 lcepy 361 次浏览 来自 问答

我使用的是淘宝的镜像

cnpm 版本:1.2.0

npm版本:2.1.8

cnpm install express 和npm install express 两个的错误信息是一样的

cnpm install express
npm ERR! Darwin 14.0.0 npm ERR! argv “node” “/Users/xiangwenwen/.nvm/v0.10.33/lib/node_modules/cnpm/node_modules/.bin/npm” “–userconfig=/Users/xiangwenwen/.cnpmrc” “–disturl=https://npm.taobao.org/dist” “–cache=/Users/xiangwenwen/.npm/.cache_cnpm” “–registry=https://registry.npm.taobao.org” “install” “express” npm ERR! node v0.10.33 npm ERR! npm v2.1.8 npm ERR! file /Users/xiangwenwen/node-project/orange-s/package.json npm ERR! code EJSONPARSE

npm ERR! Failed to parse json npm ERR! Unexpected token / npm ERR! File: /Users/xiangwenwen/node-project/orange-s/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! /Users/xiangwenwen/node-project/orange-s/npm-debug.log

求帮助

2 回复

/Users/xiangwenwen/node-project/orange-s/package.json log的意思是这个json parse不对吧。查查看

记忆中是express-generator吧

回到顶部