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?
Best Answer
react-native-cli
first usingnpm install -g react-native-cli
.react-native init YourProjectName
For detailed information, follow their guid!