Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module 'react-native-video' #3346

Closed
alan-nakagiri opened this issue Nov 14, 2023 · 5 comments
Closed

Cannot find module 'react-native-video' #3346

alan-nakagiri opened this issue Nov 14, 2023 · 5 comments

Comments

@alan-nakagiri
Copy link

Bug

Cannot find module 'react-native-video' when running tests and eslint for versions v.6.0.0-alpha9 or alpha10.

It looks like some changes were made to the "main" directory listed in package.json. The package.json file points to lib/index.js however I do not see a lib directory in the repo when pulling from npm.

Do I need to add something to my config files to resolve this or was the build command not run before publishing?

@freeboub
Copy link
Collaborator

Hi, someone reports me on slack that the alpha.10 package is not usable. I will try to fix it tonight.
But alpha.9 should be ok.

@chayin
Copy link

chayin commented Nov 15, 2023

I had this problem with video caching and here is my fix

in react-native-video.podspec

- ss.source_files = "ios/Video/**/*.{h,m,swift}" "ios/VideoCaching/**/*.{h,m,swift}"
+ s.source_files = "ios/*/**/*.{h,m,swift}"

I likewise fixed another video caching issue in /ios/VideoCaching/RCTVideoCachingHandler.swift

-    func dvAssetLoaderDelegate(loaderDelegate:DVAssetLoaderDelegate!, didLoadData data:NSData!, forURL url:NSURL!) {
+    func dvAssetLoaderDelegate(_ loaderDelegate: DVAssetLoaderDelegate!, didLoad data: Data!, for url: URL!) {
         _videoCache.storeItem(data as Data?, forUri:url.absoluteString, withCallback:{ (success:Bool) in
             DebugLog("Cache data stored successfully 🎉")
         })
      }

Plus, canImport(RCTVideoCache) doesn't work and i have absolutely no idea.

@freeboub

@freeboub
Copy link
Collaborator

@alan-nakagiri I Just rebuild alpha.11 with an additional fix to ensure package is properly build.
Test on the sample successfully on ios & android.
Let me know if this is Ok for you

@freeboub
Copy link
Collaborator

@chayin Thank you very much for the report.
Can we just follow up in this ticket please: #3217
Thank you, and let's close this issue

@alan-nakagiri
Copy link
Author

@freeboub Looks like the new release works thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants