[英]"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-app
的package.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.