You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Hot reloading error. (Unknown module "react-native") #6731
Hot reloading is not working. #6722 was closed as a dup of #6640. #6640 was Unknown module "React", the error I am getting is "Unknown module "react-native"." I tried to debug, but this is day 1 for me with react, node etc.
If it truly is fixed, please explain how to used the fixed version. I am working with a first time fresh install of everything this morning to try react.
I saw this comment:
Should work now that we have released babel-preset-react-native@1.5.5. You'll have to upgrade from 1.5.4 to 1.5.5
As far as I can tell I am up to date using 1.5.5.
Thanks.
Reacted by Miguel Oller, Maiko Kuppe and David Pohan
@adrienbrault Hot reloading should be an opt-in option. I too am having this problem with Hot Reloading, although on Android. However someone else I know on another project is having no problems at all, I fear it's something in the project itself that is causing the problems
@sylvainbaronnet You can dismiss the error view with the button at the bottom left, after that try again with ⌘ + D, did you do that on an iOS simulator ?
Same error here. After many many try and errors I found that you should always use npm start -- --reset-cache when trying to "find" this issue.
Could reproduce this with a clean react-native init project without any additional dependency.
I found a local project that still works and created two npm-shrinkwrap files which shows that the problem doesn't happen with react 0.14.7 and happen with 0.14.8 (both times react-native 0.22.2).
@gaearon this is only a temporary hack to fix the issue and unblock people. The underlying problem is not only affecting HMR but also assets, check #6638. We'll ask @davidaurelio to take a look next week when he comes back.
Interesting, npm ls babel-preset-react-native shows, that I have 1.5.6, and even after fully rebuilding the app, it still does fail with Requiring unknown module "react-native"...
Activity
adrienbrault commentedon Mar 30, 2016
Having the same issue. Is there a way to disable hot reloading ?
magrinj commentedon Mar 30, 2016
@adrienbrault If you are on iOS device do
⌘ + Dand click onDisable Hot ReloadingI'm not sure but for android I think it's
⌘ + M, if you are not on a mac tryControlinstead of⌘RealOrangeOne commentedon Mar 30, 2016
@adrienbrault Hot reloading should be an opt-in option. I too am having this problem with Hot Reloading, although on Android. However someone else I know on another project is having no problems at all, I fear it's something in the project itself that is causing the problems
hvsy commentedon Mar 30, 2016
+1
sylvainbaronnet commentedon Mar 30, 2016
Same issue
sylvainbaronnet commentedon Mar 30, 2016
@magrinj I don't have access to
⌘ + Dmenu since the app crash, is there another way to disable hot reload ?magrinj commentedon Mar 30, 2016
@sylvainbaronnet You can dismiss the error view with the button at the bottom left, after that try again with
⌘ + D, did you do that on an iOS simulator ?sylvainbaronnet commentedon Mar 30, 2016
Thanks !! It works again
satya164 commentedon Mar 30, 2016
cc @martinbigio
christoph-jerolimov commentedon Mar 31, 2016
Same error here. After many many try and errors I found that you should always use
npm start -- --reset-cachewhen trying to "find" this issue.Could reproduce this with a clean
react-native initproject without any additional dependency.I found a local project that still works and created two npm-shrinkwrap files which shows that the problem doesn't happen with react 0.14.7 and happen with 0.14.8 (both times react-native 0.22.2).
You find both npm-shrinkwrap files and the
npm installoutput after adding the "old" version and re-run it here: https://gist.github.com/jerolimov/85051d319b69ea6fe8dd24fa0f79f5f4martinbigio commentedon Mar 31, 2016
Hmm, mind trying with
babel-preset-react-native@1.5.4. Looks like for some people we have problems resolved React and for other react-native.@cpojer, @skevy has anything changed on node-haste that could explain this? This is where react-transform is configures to import React/react-native: https://github.com/facebook/react-native/blob/3a1634ec7b0dfa2b5d8890118565006d845e2039/babel-preset/configs/hmr.js#L28.
cpojer commentedon Mar 31, 2016
I haven't touched anything in node-haste for a while, might wanna ask @davidaurelio :)
8 remaining items
gaearon commentedon Mar 31, 2016
😂
pasqualino0815 commentedon Mar 31, 2016
The updated present is doing something different. I'm receiving now a tiny redbox in the upper left corner:

;)
pasqualino0815 commentedon Mar 31, 2016
The problem lies definitely in my app code.
Enabling hot reloading rendering only a simple view as follows works just fine.
I will try to find out how exactly I can reproduce this.
pohy commentedon Mar 31, 2016
The issue persists for me, am using babel-preset-react-native@1.5.6.

maikokuppe commentedon Mar 31, 2016
@martinbigio: Works for me after updating babel-preset-react-native with
Thanks!
martinbigio commentedon Mar 31, 2016
@pohy as per your screenshot you're not using 1.5.6 because
react-nativewas changed for the full path.martinbigio commentedon Mar 31, 2016
@gaearon this is only a temporary hack to fix the issue and unblock people. The underlying problem is not only affecting HMR but also assets, check #6638. We'll ask @davidaurelio to take a look next week when he comes back.
pohy commentedon Mar 31, 2016
Interesting,
npm ls babel-preset-react-nativeshows, that I have 1.5.6, and even after fully rebuilding the app, it still does fail withRequiring unknown module "react-native"...martinbigio commentedon Mar 31, 2016
make sure to reset the cache
npm start -- --reset-cachemaikokuppe commentedon Mar 31, 2016
@pohy: You could try to stop the gradle daemon (
android/gradlew --stopworks for me) and rebuild withreact-native run-android.Just an idea
pohy commentedon Mar 31, 2016
@martinbigio Yes, resetting cache helped, thanks for the help and sorry for the hassle!
Use full path for react-native on HMR config