【发布时间】:2017-03-11 11:47:29
【问题描述】:
我已经通过 npm 安装了不同的包来在 React 中运行一个简单的 hello world 应用程序(我是新手)。安装后,package.json 具有这种格式。
{
"name": "test",
"version": "1.0.0",
"description": "test",
"main": "index.js"
},
"repository": {
"type": "git",
"url": "https://github.com/theo82"
},
"keywords": [
"test"
],
"author": "Theo Tziomakas",
"license": "ISC",
"dependencies": {
"react": "^15.4.2",
"react-dom": "^15.4.2",
"webpack": "^2.2.1"
}
}
在 cmd(windows 8.1) 中运行 npm start 后,出现此错误。
npm ERR! Unexpected token ',' at 6:4
npm ERR! },
npm ERR! ^
在各种答案中,人们通过使用干净的缓存解决了这个问题
npm cache clean
但是,这对我不起作用:(。任何想法为什么会发生这种情况?
谢谢,
西奥。
【问题讨论】:
-
语法错误