作者:兔斯基小兔子_988 | 来源:互联网 | 2023-09-24 16:33
无法运行构建[webpack-cli]TypeError:cli.isValidationErrorisnotafunctionatCommand。(/Users/lok
无法运行构建 [webpack-cli] TypeError: cli.isValidationError is not a function at Command。(/Users/lokesh/Documents/projects/newminnow/minnow-app/node_modules/@webpack-cli/serve/lib/index.js:96:25) npm ERR!代码生命周期
"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"
}
}```
回答
尝试将 webpack-cli 更新到 4.5.0
webpack-cli 问题https://github.com/webpack/webpack-cli/issues/2422