reactjs - 无法修复错误:找不到模块'webpack-cli/bin/config-yargs'
问题描述
这是我在安装时安装的 package.json 包。在设置新应用程序时,它说这个错误。它的新反应应用程序和所有版本都是最新的。
{
"name": "front-end",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "webpack-dev-server --mode development --open --hot",
"build": "webpack --mode production"
},
"repository": {
"type": "git",
"url": "git+https://github.com/infinitydots-cn/front-end.git"
},
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/infinitydots-cn/front-end/issues"
},
"homepage": "https://github.com/infinitydots-cn/front-end#readme",
"keywords": [],
"dependencies": {
"react": "^17.0.1",
"react-dom": "^17.0.1",
"webpack": "^5.22.0",
"webpack-cli": "^4.5.0",
"webpack-dev-server": "^3.11.2"
},
"devDependencies": {
"babel-core": "^6.26.3",
"babel-loader": "^8.2.2",
"babel-preset-env": "^1.7.0",
"babel-preset-react": "^6.24.1",
"html-webpack-plugin": "^5.1.0"
}
}
解决方案
推荐阅读
- java - 如何在 SQL 查询中查找条件并将其 1=1 替换为 Java
- python - Django为列表中的*每个*项目排除查询集__in
- reactjs - 为什么我不能在 React Application 中显示数组数据?
- java - 如何检查声纳规则集是否包括对 DAO 层查询的检查
- amqp - AMQP:按声明顺序处理不同的队列
- amazon-web-services - AWS 实例在美国区域不起作用
- c# - Asp.Net Core 中的 SignalR 配置
- python - 使用python编辑EXCEL表格中的数据
- python - 如何在 n 元素中搜索 elastic-search-dsl
- r - 将栅格转换为数据框并在 R 中提取所需的值