electrode-io / electrode-native

A platform to ease integration&delivery of React Native apps in existing mobile applications

Home Page:https://native.electrode.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to resolve module "react" when using "ern link" with local MiniApp, remote cauldron (v0.44)

ryanliljestrom opened this issue · comments

commented

After the 0.43->0.44 upgrade, we no longer get #1713 . However we are running into a new issue:

Unable to resolve module 'react' from '../../../../../../../Users/.../my-miniapp/src/file.js': react could not be found within the project or in these directories: '../../../../../../../Users/.../my-miniapp/node_modules'

The above is via a RedBox error after the app launches in an iOS simulator. I have verified that the mentioned node_modules dir exists, and does contain react

The differences between the 0.43 and 0.44 generated metro.config.js files are:

  1. watchFolders includes the path to the local linked MiniApp on 0.43
  2. The resolver block on 0.43 includes several paths from the node_modules of the local MiniApp: third-party native dependencies, react-native, react-native-electrode-bridge, and react
  3. extraNodeModules on 0.43 includes the same above third-party and react modules. It is empty on 0.44
commented

This is still an issue on 0.45.5

commented

Hold on, looks like a different issue I'm running into on 0.45.5. It works fine as long as I manually add @babel/runtime to the JS dependencies of the MiniApp repository I am linking