LonelyCpp / react-native-youtube-iframe

A wrapper of the Youtube-iframe API built for react native.
https://lonelycpp.github.io/react-native-youtube-iframe/
MIT License
610 stars 155 forks source link

Cannot read property cache or undefined #184

Closed hugoh59 closed 3 years ago

hugoh59 commented 3 years ago

I'm getting an error as soon as I import the library in my projet,

node_modules/react-native-youtube-iframe/dist/index.js: /Users..../node_modules/react-native-youtube-iframe/dist/index.js: Cannot read property 'cache' of undefined

RCTFatal
__28-[RCTCxxBridge handleError:]_block_invoke
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_main_queue_callback_4CF
__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
__CFRunLoopRun
CFRunLoopRunSpecific
GSEventRunModal
-[UIApplication _run]
UIApplicationMain
main
start
LonelyCpp commented 3 years ago

That's weird, can you try deleting node modules and reinstalling packages?

hugoh59 commented 3 years ago

Just tried but still getting this error.

BANG88 commented 3 years ago

babel.config.js


module.exports = function (api) {
  // api.cache(true);
  return {
    presets: ['module:metro-react-native-babel-preset'],
  };
};
hugoh59 commented 2 years ago

This is already setup this way, no fix to this day. Using "react-native": "0.63.3"

hugoh59 commented 2 years ago

@LonelyCpp can you reopen this issue?