react-native-native-video-player icon indicating copy to clipboard operation
react-native-native-video-player copied to clipboard

Unable to resolve module: module does not exist in the module map

Open samanthacampisi opened this issue 7 years ago • 4 comments

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?

samanthacampisi avatar Oct 03 '17 10:10 samanthacampisi

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.

BondGoat avatar Oct 04 '17 08:10 BondGoat

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?

samanthacampisi avatar Oct 04 '17 09:10 samanthacampisi

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.

BondGoat avatar Oct 04 '17 09:10 BondGoat

Hello @samanthacampisi im getting "RNVideoPlayer.showVideoPlayer" undefined not an object.

Can you please tell me what i'm missing?

gsolanki1509 avatar Feb 27 '18 14:02 gsolanki1509