How can I install UI Kitten on Expo?

1.2k Views Asked by At

I'm trying to use UI Kitten on my project but can't figure out how to install UI Kitten on Expo.

expo install @ui-kitten/eva-icons @eva-design/eva @ui-kitten/components react-native-svg

Error:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! While resolving: undefined@undefined
npm ERR! Found: [email protected]
npm ERR! node_modules/react-native-svg
npm ERR!   react-native-svg@"12.1.0" from the root project
npm ERR! Could not resolve dependency:
npm ERR! peer react-native-svg@"^9.13.6" from @ui-kitten/[email protected]
npm ERR! node_modules/@ui-kitten/components
npm ERR!   @ui-kitten/components@"*" from the root project
npm ERR!   peer @ui-kitten/components@"5.1.0" from @ui-kitten/[email protected]
npm ERR!   node_modules/@ui-kitten/eva-icons
npm ERR!     @ui-kitten/eva-icons@"*" from the root project
2

There are 2 best solutions below

1
On

In error it is clearly shown that react-native-svg@"^9.13.6" kitten UI is using the above version and your project is using 12.1.0 for using kitten UI you need to use react-native-svg@"^9.13.6" version.

0
On

It's NPM 7 responsible for it. Running this should fix it:

npm install -g npm@6