package.json中的构建脚本上的npm错误“命令语法不正确”

时间:2019-11-15 07:27:06

标签: javascript node.js reactjs npm npm-scripts

我最近在遵循YouTube教程的同时尝试设置React应用。 我浏览了其他文章,但找不到确切的语法问题。 Here is an image of my the various folders and files that make up the project

webpack -d && copy src/index.html dist/index.html && webpack-dev-server --content-base src/ --inline"

这是我的package.json文件

{
  "name": "reactenv",
  "version": "1.0.0",
  "description": "React Enviroment",
  "main": "index.js",
  "scripts": {
    "start": "npm run build",
    "build": "webpack -d && copy src/index.html dist/index.html && webpack-dev-server --content-base src/ --inline",
    "build:prod": "webpack -p && copy src/index.html dist/index.html"
  },
  "keywords": [
    "reactjs"
  ],
  "author": "Lee Warner",
  "license": "ISC",
  "dependencies": {
    "react": "^16.12.0",
    "react-dom": "^16.12.0"
  },
  "devDependencies": {
    "babel-loader": "^8.0.6",
    "babel-preset-es2016": "^6.24.1",
    "babel-preset-react": "^6.24.1",
    "babel-preset-stage-2": "^6.24.1",
    "webpack": "^4.41.2",
    "webpack-cli": "^3.3.10",
    "webpack-dev-server": "^3.9.0"
  }
}

0 个答案:

没有答案