reactjs 我试图在我的react应用程序中安装firebase,并得到此错误

toe95027  于 2023-01-30  发布在  React
关注(0)|答案(1)|浏览(156)

当我把npm install firebasenpm i firebase放进windows时,它显示了这个

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: react-currency-format@1.1.0
npm ERR! Found: react@18.2.0
npm ERR! node_modules/react
npm ERR!   peer react@">=16.8.0" from @emotion/react@11.10.5
npm ERR!   node_modules/@emotion/react
npm ERR!     peer @emotion/react@"^11.0.0-rc.0" from @emotion/styled@11.10.5
npm ERR!     node_modules/@emotion/styled
npm ERR!       peerOptional @emotion/styled@"^11.3.0" from @mui/material@5.11.4
npm ERR!       node_modules/@mui/material
npm ERR!         peer @mui/material@"^5.0.0" from @mui/icons-material@5.11.0
npm ERR!         node_modules/@mui/icons-material
npm ERR!         1 more (the root project)
npm ERR!       3 more (@mui/styled-engine, @mui/system, the root project)
npm ERR!     peerOptional @emotion/react@"^11.5.0" from @mui/material@5.11.4
npm ERR!     node_modules/@mui/material
npm ERR!       peer @mui/material@"^5.0.0" from @mui/icons-material@5.11.0
npm ERR!       node_modules/@mui/icons-material
npm ERR!         @mui/icons-material@"^5.11.0" from the root project  
npm ERR!       1 more (the root project)
npm ERR!     3 more (@mui/styled-engine, @mui/system, the root project)
npm ERR!   peer react@">=16.8.0" from @emotion/styled@11.10.5
npm ERR!   node_modules/@emotion/styled
npm ERR!     peerOptional @emotion/styled@"^11.3.0" from @mui/material@5.11.4
npm ERR!     node_modules/@mui/material
npm ERR!       peer @mui/material@"^5.0.0" from @mui/icons-material@5.11.0
npm ERR!       node_modules/@mui/icons-material
npm ERR!         @mui/icons-material@"^5.11.0" from the root project  
npm ERR!       1 more (the root project)
npm ERR!     peerOptional @emotion/styled@"^11.3.0" from @mui/styled-engine@5.11.0
npm ERR!     node_modules/@mui/styled-engine
npm ERR!       @mui/styled-engine@"^5.11.0" from @mui/system@5.11.4   
npm ERR!       node_modules/@mui/system
npm ERR!         @mui/system@"^5.11.4" from @mui/material@5.11.4      
npm ERR!         node_modules/@mui/material
npm ERR!     2 more (@mui/system, the root project)
npm ERR!   21 more (@emotion/use-insertion-effect-with-fallbacks, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^0.14 || ^15.0.0-rc || ^15.0.0 || ^16.0.0-rc || ^16.0.0 || ^17.0.0" from react-currency-format@1.1.0
npm ERR! node_modules/react-currency-format
npm ERR!   react-currency-format@"^1.1.0" from the root project       
npm ERR! 
npm ERR! Conflicting peer dependency: react@17.0.2
npm ERR! node_modules/react
npm ERR!   peer react@"^0.14 || ^15.0.0-rc || ^15.0.0 || ^16.0.0-rc || ^16.0.0 || ^17.0.0" from react-currency-format@1.1.0
npm ERR!   node_modules/react-currency-format
npm ERR!     react-currency-format@"^1.1.0" from the root project     
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\ADITI\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\ADITI\AppData\Local\npm-cache\_logs\2023-01-29T06_34_53_211Z-debug-0.log
70gysomp

70gysomp1#

npm ERR! While resolving: react-currency-format@1.1.0
npm ERR! Found: react@18.2.0

Conflicting peer dependency: react@17.0.2

我认为这个react版本不兼容react货币格式
卸载带有npm uninstall react的react版本并尝试更新npm install react@18.2.0
如果您处理了此错误,请通知我。

相关问题