我正在更新React到16.3.0并且我的应用程序与Error: Cannot find module 'react-dev-utils/ignoredFiles'
崩溃了。
我尝试将此命令写入console:npm install --save-dev react-scripts
,但它没有帮助,我尝试从项目中删除节点模块并使用npm i
重新安装它,但没有任何结果。
package.json的依赖关系:
"dependencies": {
"autoprefixer": "7.1.2",
"babel-core": "6.25.0",
"babel-eslint": "7.2.3",
"babel-jest": "20.0.3",
"babel-loader": "7.1.1",
"babel-preset-react-app": "^3.0.2",
"babel-runtime": "6.26.0",
"case-sensitive-paths-webpack-plugin": "2.1.1",
"chalk": "1.1.3",
"css-loader": "0.28.4",
"dotenv": "4.0.0",
"eslint": "4.4.1",
"eslint-config-react-app": "^2.0.0",
"eslint-loader": "1.9.0",
"eslint-plugin-flowtype": "2.35.0",
"eslint-plugin-import": "2.7.0",
"eslint-plugin-jsx-a11y": "5.1.1",
"eslint-plugin-react": "7.1.0",
"extract-text-webpack-plugin": "3.0.0",
"file-loader": "0.11.2",
"fs-extra": "3.0.1",
"html-webpack-plugin": "2.29.0",
"jest": "20.0.4",
"object-assign": "4.1.1",
"postcss-flexbugs-fixes": "3.2.0",
"postcss-loader": "2.0.6",
"promise": "8.0.1",
"prop-types": "^15.6.0",
"radium": "^0.19.4",
"react": "^16.3.0",
"react-dom": "^16.3.0",
"style-loader": "0.18.2",
"sw-precache-webpack-plugin": "0.11.4",
"url-loader": "0.5.9",
"webpack": "3.5.1",
"webpack-dev-server": "2.7.1",
"webpack-manifest-plugin": "1.2.1",
"whatwg-fetch": "2.0.3"
}
答案 0 :(得分:0)
我会假设你正在使用" create-react-app"
我建议您删除package-lock.json
,然后运行npm install
在大多数情况下碰撞package.json和的react-scripts版本 在这个文件夹中运行npm install就足够了。
npm install --save --save-exact react-scripts@1.1.4