5

无法运行构建 [webpack-cli] TypeError: cli.isValidationError 不是 Command 中的函数。(/Users/lokesh/Documents/projects/newminnow/minnow-app/node_modules/@webpack-cli/serve/lib/index.js:96:25) npm 错误!代码 ELIFECYCL

  "name": "appp",
  "version": "1.0.0",
  "license": "UNLICENSED",
  "main": "index.js",
  "scripts": {
    "start": "webpack serve --config webpack.dev.js",
    "build": "webpack  --config webpack.prod.js",
    "lint": "eslint --fix src/js/** --ext .js --ext .jsx",
    "report": "npm run build --withReport true"
  },
  "dependencies": {
    "node-sass": "4.14.1",
    "path": "0.12.7",
    "prop-types": "15.7.2",
    "query-string": "6.13.7",
    "react": "17.0.1",
    "react-cookie": "4.0.3",
    "react-dom": "17.0.1",
    "react-ga": "3.3.0",
    "react-redux": "7.2.2",
    "react-router-dom": "5.2.0",
    "react-stripe-elements": "6.1.2",
    "redux": "4.0.5",
    "redux-thunk": "2.3.0",
    "sass-loader": "10.1.0",
    "style-loader": "2.0.0",
    "url-loader": "4.1.1",
    "webpack": "5.10.0",
    "webpack-bundle-analyzer": "4.3.0",
    "webpack-cli": "4.3.1",
    "webpack-merge": "5.4.0",
    "whatwg-fetch": "3.5.0"
  },
  "devDependencies": {
    "webpack-dev-server": "3.11.0",
    "redux-logger": "3.0.6"
  }
}```
4

1 回答 1

9

尝试将 webpack-cli 更新到 4.5.0

webpack-cli 问题https://github.com/webpack/webpack-cli/issues/2422

于 2021-02-26T11:07:50.117 回答