Skip to content
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

locals[0] does not appear to be a module object with Hot Module Replacement API enabled. #8463

Closed
spacesuitdiver opened this issue Jun 28, 2016 · 13 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@spacesuitdiver
Copy link

spacesuitdiver commented Jun 28, 2016

I'm getting the following error after enabling hot reloading (iOS Simulator and Device):

locals[0] does not appear to be a `module` object with Hot Module replacement API enabled. You should disable react-transform-hmr in production by using `env` section in Babel configuration. See the example in README: https://github.com/gaearon/react-transform-hmr

proxyReactComponents
    index.ios.bundle?platform=ios&dev=false&minify=false&hot=true:5218:16
<unknown>
    index.ios.bundle?platform=ios&dev=false&minify=false&hot=true:1475:1078
loadModuleImplementation
    index.ios.bundle?platform=ios&dev=false&minify=false&hot=true:127:8
guardedLoadModule
    index.ios.bundle?platform=ios&dev=false&minify=false&hot=true:63:37
_require
    index.ios.bundle?platform=ios&dev=false&minify=false&hot=true:54:18
<unknown>
    index.ios.bundle?platform=ios&dev=false&minify=false&hot=true:77149:9

This is after a fresh install of 0.28 using react-native init Home, upgrading React and RN to ^15.2.0-rc.1 and ^0.29.0-rc.0 respectively, then running react-native upgrade. Node version is 6.1.0 but also did it in 4.

@satya164
Copy link
Contributor

cc @grabbou I believe we had faced the same issue.

@LeBlaaanc can you provide a sample project demonstrating the issue?

@spacesuitdiver
Copy link
Author

spacesuitdiver commented Jun 28, 2016

@satya164 does it just straight out of react-native init Foo.

@grabbou
Copy link
Contributor

grabbou commented Jun 28, 2016

Yeah, had it as well, cc: @martinbigio as you were looking for other repros.

@alexHlebnikov
Copy link

alexHlebnikov commented Jun 29, 2016

I've faced same issue after upgrading from 0.28 to 0.29 RC0.
I can't solve it so I've downgraded back to 0.28.

@nihgwu
Copy link
Contributor

nihgwu commented Jun 30, 2016

please check this #8091
because the env is set to dev=false by default in this PR shipped in RN0.29RC0
I've mentioned the issue there, and you can solve the issue by using the old js bundle path
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];
or launching the patch 9845f49 manully

@pavlelekic
Copy link

I'm facing the same issue.

@pavlelekic
Copy link

If I leave dev=true then I'm not able to have a production build, I'm stuck with the slow dev version :(

@mmazzarolo
Copy link

Having the same issue on [email protected]... any suggestion?

@arilitan
Copy link

I just randomly started experiencing this as well, anyone find a solution?

@jeremyong
Copy link

Been seeing this issue for multiple releases. Developing without it is extremely frustrating

@fabriziomoscon
Copy link

Hi guys,
Suddenly my hot reloading stopped working with this error message.
It turned out that I set __DEV__=false in the Development Menu by mistake.
Checking the tick back gets rid of the error and Hot Reload works as before.

I understand that this is not a good compromise if you want to develop with hot reloading and __DEV__=false, but in my case I had just triggered it by mistake so hopefully this comment could still help somebody.

@codebymikey
Copy link

For me this error occurs in Dev mode, when "JS Dev Mode" is disabled, but "Enable Hot Reloading" is also enabled.

Disabling "Enable Hot Reloading" fixes it, but sometimes you want hot reloading without JS dev mode enabled.

@hramos
Copy link
Contributor

hramos commented Jul 20, 2017

Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally!

If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:

  • Does the issue still reproduce on the latest release candidate? Post a comment with the version you tested.
  • If so, is there any information missing from the bug report? Post a comment with all the information required by the issue template.
  • Is there a pull request that addresses this issue? Post a comment with the PR number so we can follow up.

If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution.

@hramos hramos added the Icebox label Jul 20, 2017
@hramos hramos closed this as completed Jul 20, 2017
@facebook facebook locked as resolved and limited conversation to collaborators Jul 20, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests