简体   繁体   English

create-react-app 版本 5 的“eslint-config-react-app”问题

[英]"eslint-config-react-app" issue with create-react-app version 5

I have decided to upgrade to the new version of create-react-app and after doing so I tried launching the app via "npm start" and whenever it has loaded onto the screen the error below pops up:我决定升级到新版本的 create-react-app 并且在这样做之后我尝试通过“npm start”启动该应用程序,只要它加载到屏幕上就会弹出以下错误:

Compiled with problems:X ERROR Plugin "react" was conflicted between "package.json » eslint-config-react-app » C:\Users\27par\Desktop\React Projects\development\finevines\node_modules\eslint-config-react-app\base.js" and "BaseConfig » C:\Users\27par\Desktop\React Projects\Development\finevines\node_modules\eslint-config-react-app\base.js".编译时出现问题:X 错误插件“react”在“package.json » eslint-config-react-app » C:\Users\27par\Desktop\React Projects\development\finevines\node_modules\eslin 之间发生冲突app\base.js”和“BaseConfig » C:\Users\27par\Desktop\React Projects\Development\finevines\node_modules\eslint-config-react-app\base.js”。

Image of error: https://gyazo.com/a03be194379ea52e6d7ddd697eefb8aa错误图片: https://gyazo.com/a03be194379ea52e6d7ddd697eefb8aa

I am wondering if anyone else is having the same issue as me and if there is any possible fix for it.我想知道是否有其他人和我有同样的问题,是否有任何可能的解决方法。

Thank you.谢谢你。

You need to update all the packages as in the case of eslint-config-react-app 's package.json it would have the previous version of create-react-app .您需要像eslint-config-react-apppackage.json一样更新所有软件包,它将具有以前版本的create-react-app So, basically the error is telling you that you are updating to the new version, but the other libraries in your project use another version.所以,基本上错误是告诉你你正在更新到新版本,但你项目中的其他库使用另一个版本。

Try doing - npm run update尝试做npm run update

Just try running npm update in the terminal being in the root directory of the folder.只需尝试在文件夹根目录下的终端中运行 npm 更新即可。 Hope this works.希望这有效。

have tried the solution but hasn't worked for me已经尝试了解决方案,但对我没有用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Atom & eslint:找不到模块 'eslint-config-react-app' - Atom & eslint: Cannot find module 'eslint-config-react-app' eslint-config-react-app 无效 属性“覆盖”是错误的类型 - eslint-config-react-app is invalid Property “overrides” is the wrong type (ESLint)在VS 2017 react项目中找不到模块'eslint-config-react-app' - (ESLint) Cannot find module 'eslint-config-react-app' in VS 2017 react project 用create-react-app facebook孵化器陪伴 - eslint with create-react-app facebook incubator 编辑Create-React-App ESLint规则 - Editing Create-React-App ESLint rules 插件“react”中的错误在“package.json » eslint-config-react-app 之间发生冲突 - ERROR in Plugin "react" was conflicted between "package.json » eslint-config-react-app 无法加载在“package.json » eslint-config-react-app »”中声明的插件“react”:输入意外结束 - Failed to load plugin 'react' declared in 'package.json » eslint-config-react-app » ': Unexpected end of input 禁用 create-react-app 提供的 ESLint - Disable ESLint that create-react-app provides 插件“react”在“package.json » eslint-config-react-app 之间发生冲突 - Plugin "react" was conflicted between "package.json » eslint-config-react-app eslint-config-react-app throws找不到规则“ getter-return”的定义 - eslint-config-react-app throws Definition for rule 'getter-return' was not found
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM