繁体   English   中英

package.json错误

[英]Error with package.json

我在mean.js应用程序的根目录中运行“ npm build”和“ npm start”,但是遇到以下错误:

npm ERR! file /Users/developer/dev-projects/everest-web/package.json
npm ERR! code EJSONPARSE
npm ERR! JSON.parse Failed to parse json
npm ERR! JSON.parse Unexpected string in JSON at position 162 while parsing
'{
npm ERR! JSON.parse   "name": "meanauthapp",
npm ERR! JSON.parse   "version": '

npm ERR! JSON.parse Failed to parse package.json data.
npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.

这是我的package.json文件:

{
"name": "meanauthapp",
"version": "1.0.0",
"description": "MEAN stack authentication app",
"main": "app.js",
"scripts": {
"start": "node app"
"ng": "ng"
},
"dependencies": {
"express": "4.16.2",
"mongoose": "4.13.6",
"bcryptjs": "2.4.3",
"cors": "2.8.4",
"jsonwebtoken": "8.1.0",
"body-parser": "1.18.2",
"passport": "0.4.0",
"passport-jwt": "3.0.1"
},
"author": "",
"license": "MIT",
"devDependencies": {
"@angular/cli": "^1.6.0"
}
}

“开始”后没有逗号:“节点应用”

检查“无法解析JSON”错误的最简单方法是将文件内容粘贴到验证程序中。

我建议:

https://jsonlint.com/

按“验证JSON”,第7行中缺少的逗号将突出显示。

暂无
暂无

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

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