{
"name": "test",
"version": "0.0.0",
"private": true,
"scripts": {
"start": "node ./bin/www"
},
"dependencies": {
"body-parser": "~1.15.2",
"cookie-parser": "~1.4.3",
"debug": "~2.2.0",
"ejs": "~2.5.2",
"express": "~4.14.0",
"method-override": "*",
"mongodb": "^1.4.19",
"morgan": "~1.7.0",
"serve-favicon": "~2.3.0"
"express-session": "*",
"connect-mongo": "*",
"connect-flash": "*"
}
}
这是package.json里面的
下面是报错信息:
error Windows_NT 10.0.14393
14 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
15 error node v6.9.5
16 error npm v3.10.10
17 error file F:\www\blog\test\package.json
18 error code EJSONPARSE
19 error Failed to parse json
19 error Unexpected token 'e' at 18:6
19 error "express-session": "*",
19 error ^
20 error File: F:\www\blog\test\package.json
21 error Failed to parse package.json data.
21 error package.json must be actual JSON, not just JavaScript.
21 error
21 error This is not a bug in npm.
21 error Tell the package author to fix their package.json file. JSON.parse
22 verbose exit [ 1, true ]
"serve-favicon": "~2.3.0"
后面忘记加逗号了。有语法高亮看一眼就能看出来吧!!!而且还有解释器的提示。