oblador / react-native-vector-icons

Customizable Icons for React Native with support for image source and full styling.
https://oblador.github.io/react-native-vector-icons/
MIT License
17.31k stars 2.12k forks source link

NPM Installation Error #1445

Closed moaazassali closed 2 years ago

moaazassali commented 2 years ago

Environment

OS: MacOS BigSur Version 11.4 Target Platform: iPhone 13, iOS 15.2 react-native-vector-icons version: 9.2.0 React Native Version: 0.69.0

Description

I am just trying to install react-native-vector-icons using: "npm install --save react-native-vector-icons" and it isn't working. These are the errors I am getting: npm WARN ERESOLVE overriding peer dependency npm WARN While resolving: react-shallow-renderer@16.14.1 npm WARN Found: react@18.0.0 npm WARN node_modules/react npm WARN peer react@"18.0.0" from react-native@0.69.0 npm WARN node_modules/react-native npm WARN peer react-native@"" from @react-native-community/cli@8.0.2 npm WARN node_modules/@react-native-community/cli npm WARN 1 more (the root project) npm WARN 3 more (react-shallow-renderer, use-sync-external-store, the root project) npm WARN npm WARN Could not resolve dependency: npm WARN peer react@"^16.0.0 || ^17.0.0" from react-shallow-renderer@16.14.1 npm WARN node_modules/react-shallow-renderer npm WARN react-shallow-renderer@"16.14.1" from react-native@0.69.0 npm WARN node_modules/react-native npm WARN npm WARN Conflicting peer dependency: react@17.0.2 npm WARN node_modules/react npm WARN peer react@"^16.0.0 || ^17.0.0" from react-shallow-renderer@16.14.1 npm WARN node_modules/react-shallow-renderer npm WARN react-shallow-renderer@"16.14.1" from react-native@0.69.0 npm WARN node_modules/react-native npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: react-test-renderer@17.0.2 npm ERR! Found: react@18.0.0 npm ERR! node_modules/react npm ERR! peer react@"18.0.0" from react-native@0.69.0 npm ERR! node_modules/react-native npm ERR! peer react-native@"" from @react-native-community/cli@8.0.2 npm ERR! node_modules/@react-native-community/cli npm ERR! @react-native-community/cli@"^8.0.0" from react-native@0.69.0 npm ERR! react-native@"0.69.0" from the root project npm ERR! peer react@"^16.0.0 || ^17.0.0 || ^18.0.0" from react-shallow-renderer@16.15.0 npm ERR! node_modules/react-test-renderer/node_modules/react-shallow-renderer npm ERR! react-shallow-renderer@"^16.13.1" from react-test-renderer@17.0.2 npm ERR! node_modules/react-test-renderer npm ERR! dev react-test-renderer@"17.0.2" from the root project npm ERR! 2 more (use-sync-external-store, the root project) npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"17.0.2" from react-test-renderer@17.0.2 npm ERR! node_modules/react-test-renderer npm ERR! dev react-test-renderer@"17.0.2" from the root project npm ERR! npm ERR! Conflicting peer dependency: react@17.0.2 npm ERR! node_modules/react npm ERR! peer react@"17.0.2" from react-test-renderer@17.0.2 npm ERR! node_modules/react-test-renderer npm ERR! dev react-test-renderer@"17.0.2" 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.

Reproducible Demo

Run "npm install --save react-native-vector-icons" on new react native project

moaazassali commented 2 years ago

I just started another new project and it worked. The error could have been because I upgraded from react native 0.68.0 to 0.69.0, which might have caused some issues.