【问题标题】:React Webpack Utils Error反应 Webpack 实用程序错误
【发布时间】:2018-12-19 23:45:04
【问题描述】:

运行npm start 时出现此错误

找不到模块'react-dev-utils/WebpackDevServerUtils'

我什至尝试删除并重新安装。有什么帮助吗?这是 package.json

{
  "name": "tic-tac-toe-app",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "react": "^16.4.1",
    "react-dom": "^16.4.1",
    "react-router": "^4.3.1",
    "react-router-dom": "^4.3.1",
    "react-scripts": "1.1.4",
    "webpack": "^4.15.1"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"
  },
  "devDependencies": {
    "react-dev-utils": "^5.0.1",
    "react-scripts": "^1.1.4",
    "webpack": "^1.15.0",
    "webpack-cli": "^3.0.8",
    "webpack-command": "^0.4.1",
    "webpack-dev-server": "^3.1.4"
  }
}

【问题讨论】:

  • 运行 npm i,并确保它在你的包中,并包含在内。
  • @TGarrett 没用 :(
  • 请发布您的 package.json,特别是“开始”行
  • 我重写了问题

标签: javascript reactjs npm npm-start


【解决方案1】:

删除项目中的“node_modules”文件夹

然后再次运行npm install

【讨论】:

  • 现在我得到“无法读取未定义的属性‘thisCompilation’”错误
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2018-11-08
  • 2017-03-20
  • 1970-01-01
  • 1970-01-01
  • 2021-06-22
  • 1970-01-01
  • 2020-01-03
相关资源
最近更新 更多