简体   繁体   中英

I am trying to install firebase in my react app and getting this error

it is showing this as i am putting npm install firebase or npm i firebase in 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
npm ERR! While resolving: react-currency-format@1.1.0
npm ERR! Found: react@18.2.0

Conflicting peer dependency: react@17.0.2

i think this react versions are not compatible react-currency-format

uninstall react version with npm uninstall react and try to update npm install react@18.2.0

let me know if you handle this error.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM