I'm trying to install react-native through npm install --save react-native for my library so I can export a react component that uses View as a wrapper around it's children to be platform agnostic. When I try to import react-native it spews hundreds of lines saying that it can't resolve modules in react-native
eg
Error in ./~/react-native/Libraries/react-native/react-native.js
Module not found: Error: Cannot resolve module 'ActivityIndicator'
What's the best way to resolve this?
react-native-cli first using
npm install -g react-native-cli.react-native init YourProjectNameFor detailed information, follow their guid!
delete package-lock.json file and node modules folder, then npm install.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With