簡體   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