Carimus / metro-symlinked-deps

A metro bundler configuration customizer to more easily detect and workaround symlinked dependencies which metro does not support.
MIT License
43 stars 3 forks source link

Invarian Violation: Module HMRClient is not registered (RN 0.61.5) #4

Open ryantrem opened 4 years ago

ryantrem commented 4 years ago

Just tried this out on a brand new project using React Native 0.61.5 and as soon as I try to use something from my sym linked package I get this error in my app (after the bundle has loaded 100%):

Invariant Violation: Module HMRClient is not a registered callable module (calling setup)

This is using the default configuration suggested for metro.config.js. Any ideas?

ryantrem commented 4 years ago

After more investigation I found that the package.json file created by create-react-native-module MyLibrary includes react-native in the devDependencies. If I remove this, then I don't get the above error. I'm not sure if the blacklisting stuff that metro-symlinked-deps provides is supposed to be helping with this or not.