首页 > 解决方案 > 无法修复错误:找不到模块'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"
  }
}

标签: reactjs

解决方案


推荐阅读