react-native-native-video-player
react-native-native-video-player copied to clipboard
Unable to resolve module: module does not exist in the module map
I'm trying to install and use the package according to the instructions in the README.
I'm using RN 0.48.
I run npm install react-native-native-video-player --save
, then
react-native link react-native-native-video-player
then when I add var VideoPlayer = require('react-native-native-video-player');
I find this error in my app.
Am I missing something?
Hi @samanthacampisi ,
Sorry for late respond. Are you using Android or iOS, and what is the error that you have?
If you're running in iOS, please open XCode, and do these steps:
- Go to Build Settings > Search Paths > Header Search Paths
- Edit the path variable from $(SRCROOT)/../../../HuntersLog to $(SRCROOT)/../../../[YOUR PROJECT FOLDER NAME]
Let me know if you still have any problem.
Thanks.
Hey, no prob!
I was using iOS. Following these steps helped and it worked.
When I used Android, however, I got a compilation error. If someone else is having this problem, removing the following part in VideoPlayerPackage.java worked for me:
@Override public List<Class<? extends JavaScriptModule>> createJSModules() { return Collections.emptyList(); }
Is it not necessary anymore?
Hmm... It's maybe different in RN 0.48, I created this when RN was 0.35.
Thanks for your note, I'll update in README.
Hello @samanthacampisi im getting "RNVideoPlayer.showVideoPlayer" undefined not an object.
Can you please tell me what i'm missing?