【发布时间】:2020-06-19 03:19:08
【问题描述】:
npm 错误!代码 EJSONPARSE
npm 错误!文件 C:\Users\thehitmanranjan\Desktop\git-test\package.json
npm 错误! JSON.parse 解析json失败
npm 错误! JSON.parse JSON 中第 240 位的意外字符串,而 解析'{
npm 错误! JSON.parse "name": "git-test",
npm 错误! JSON.parse "版本": "1.'
npm 错误! JSON.parse 解析 package.json 数据失败。
npm 错误! JSON.parse package.json 必须是实际的 JSON,而不仅仅是 JavaScript。
这是我在发出命令“npm start”时遇到的错误。 我的 package.JSON 文件有以下内容:
{
"name": "git-test",
"version": "1.0.0",
"description": "\"This is a test directory to learn Git and Node\"",
"main": "index.html",
"scripts": {
"start":"npm run lite",
"test": "echo \"Error: no test specified\" && exit 1"
"lite":"lite-server"
},
"repository": {
"type": "git",
"url": "git+https://github.com/thehitmanranjan/git-test.git"
},
"author": "Pratik Ranjan",
"license": "ISC",
"bugs": {
"url": "https://github.com/thehitmanranjan/git-test/issues"
},
"homepage": "https://github.com/thehitmanranjan/git-test#readme",
"devDependencies": {
"lite-server": "^2.5.4"
}
}
【问题讨论】:
标签: node.js json npm node-modules angular-fullstack