Json 键入“时出现多个错误”;“新产品管理启动”;在bash终端中

Json 键入“时出现多个错误”;“新产品管理启动”;在bash终端中,json,npm,Json,Npm,这些是我在bash终端中键入“npm start”时收到的错误: npm ERR! code EJSONPARSE npm ERR! file /Users/nickperry/Desktop/NucampFolder/git-test/package.json npm ERR! JSON.parse Failed to parse json npm ERR! JSON.parse Unexpected token } in JSON at position 234 while parsi

这些是我在bash终端中键入“npm start”时收到的错误:

npm ERR! code EJSONPARSE

npm ERR! file /Users/nickperry/Desktop/NucampFolder/git-test/package.json

npm ERR! JSON.parse Failed to parse json

npm ERR! JSON.parse Unexpected token } in JSON at position 234 while parsing near '...": "lite-server",

npm ERR! JSON.parse   },

npm ERR! JSON.parse   "repository": {...'

npm ERR! JSON.parse Failed to parse package.json data.

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

npm ERR! A complete log of this run can be found in:

npm ERR!     /Users/nickperry/.npm/_logs/2019-11-15T17_16_58_597Z-debug.log
    {
  "name": "git-test",
  "version": "1.0.0",
  "description": "Git and NPM",
  "main": "index.html",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "npm run lite",
    "lite": "lite-server",
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/NickPurry/git-test.git"
  },
  "author": "",
  "license": "ISC",
  "bugs": {
    "url": "https://github.com/NickPurry/git-test/issues"
  },
  "homepage": "https://github.com/NickPurry/git-test#readme",
  "devDependencies": {
    "lite-server": "^2.3.0"
  }
}
以下是my package.json文件夹的内容:

npm ERR! code EJSONPARSE

npm ERR! file /Users/nickperry/Desktop/NucampFolder/git-test/package.json

npm ERR! JSON.parse Failed to parse json

npm ERR! JSON.parse Unexpected token } in JSON at position 234 while parsing near '...": "lite-server",

npm ERR! JSON.parse   },

npm ERR! JSON.parse   "repository": {...'

npm ERR! JSON.parse Failed to parse package.json data.

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

npm ERR! A complete log of this run can be found in:

npm ERR!     /Users/nickperry/.npm/_logs/2019-11-15T17_16_58_597Z-debug.log
    {
  "name": "git-test",
  "version": "1.0.0",
  "description": "Git and NPM",
  "main": "index.html",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "npm run lite",
    "lite": "lite-server",
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/NickPurry/git-test.git"
  },
  "author": "",
  "license": "ISC",
  "bugs": {
    "url": "https://github.com/NickPurry/git-test/issues"
  },
  "homepage": "https://github.com/NickPurry/git-test#readme",
  "devDependencies": {
    "lite-server": "^2.3.0"
  }
}

这里的任何帮助都将不胜感激。谢谢。

第234行还有一个逗号。数组中最后一个元素的末尾不能有逗号。

与JavaScript对象文字不同,JSON在对象的姓氏值par后面不需要逗号。因此,您需要删除名称值par
“lite”:“lite server”

使用以下命令:

    "scripts": {
        "test": "echo \"Error: no test specified\" && exit 1",
        "start": "npm run lite",
        "lite": "lite-server"
    }

请把这个包的内容贴出来。我知道了。我在“lite服务器”后面加了一个逗号。谢谢大家。