-
Notifications
You must be signed in to change notification settings - Fork 101
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
Repack v3 HMR breaks React Native inspector/devtools #251
Comments
Seems like this issue was related to I found two solutions:
|
In my tests, downgrading to 0.4.3 made the initial webpack builds much slower - so that wasn't an option, unfortunately. Removing the I think this has something to do with the patch made in #1 to initialize devtools before react-refresh. (Specifically this block here) It seems to no longer work with the latest version of My solution: In https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/0610d3c11ee54733612eb1a8a12400cf42ed24c7/lib/index.js#L75, use the legacy logic for injecting the plugin:
By doing this, the patch to re-arrange the plugin initialization order is able to correctly find the refresh plugin, because it hits this block instead:
There is probably a more correct way to do this (maybe change the code to find the react-refresh plugin to match the new |
also check if all the .lock file has same version of ["@pmmmwh/react-refresh-webpack-plugin": "^0.4.3"]. Remove other version of react-refresh-webpack-plugin in .lock files. [in All Mini App also] |
Environment
"@callstack/repack": "^3.0.0"
"react-native": "0.70.1"
node: v16.14.2
yarn: 1.22.19
Description
App throws error when attempting to access react native inspector (cmd+d) -> 'Show Inspector' and no inspection tools are available. After doing this the menu shows 'Hide Inspector' option and clicking this shows the same error.
Error in console:
[Console] Invariant Violation: Expected to find at least one React Native renderer on DevTools hook., js engine: hermes
Error on device:
Disabling HMR in webpack.config.js shows the inspector as expected.
Reproducible Demo
npx react-native init test_app --template react-native-template-typescript
react-native webpack-start
and runyarn ios --no-packager
The text was updated successfully, but these errors were encountered: