Javascript 反应设置';npm运行构建';“错误”;意外标记';b';18时4分“;

Javascript 反应设置';npm运行构建';“错误”;意外标记';b';18时4分“;,javascript,json,node.js,reactjs,Javascript,Json,Node.js,Reactjs,当前正在使用本教程: 我认为我遵循了所有正确的步骤,但当我尝试第七步时,我得到了这个错误(见图) 这是我的package.json文件——我承认我可能在试图让它自己工作时做了一些更改 { "name": "rapp", "version": "1.0.0", "description": "\"\"", "main": "index.js", "repository": { "type": "git", "url": "\"\"" }, "keywords": [ "\"

当前正在使用本教程:

我认为我遵循了所有正确的步骤,但当我尝试第七步时,我得到了这个错误(见图)

这是我的package.json文件——我承认我可能在试图让它自己工作时做了一些更改

{
"name": "rapp",
"version": "1.0.0",
"description": "\"\"",
"main": "index.js",
"repository": {
    "type": "git",
    "url": "\"\""
},
"keywords": [
    "\"\""
],
"author": "\"BH0\"",
"license": "ISC",
"scripts": {

    "test": "\"\""
    "build": "webpack -d && cp src/app/index.html dist/index.html && webpack-dev-server --hot --inline --colors --progress --content-base src/",
    "build-prod": "webpack -p && cp src/app/index.html dist/index.html"
}
}


多谢各位

您可能应该在“test”之后添加逗号“\”\”

您的package.json无效。删除脚本部分中的测试条目或在其后面添加一个
。现在应该可以了

应该是

{
"name": "rapp",
"version": "1.0.0",
"description": "\"\"",
"main": "index.js",
"repository": {
    "type": "git",
    "url": "\"\""
},
"keywords": [
    "\"\""
],
"author": "\"BH0\"",
"license": "ISC",
"scripts": {

    "test": "\"\"",
    "build": "webpack -d && cp src/app/index.html dist/index.html && webpack-dev-server --hot --inline --colors --progress --content-base src/",
    "build-prod": "webpack -p && cp src/app/index.html dist/index.html"
}