question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

13reactions
codebymikeycommented, Feb 28, 2017

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.

2reactions
fabriziomosconcommented, Dec 14, 2016

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

locals[0] does not appear to be a `module` object with Hot ...
It's the error i get when running the server. I guess hot module replacement is not intended for use on the server. But...
Read more >
Error: locals[0] does not appear to be a `module` object with ...
I'm trying to start my app on node server and I get error: Uncaught Error: locals[0] does not appear to be a module...
Read more >
throw new Error('locals[0] does not appear to be a `module` object ...
throw new Error('locals[0] does not appear to be a `module` object with Hot Module ' + 'replacement API enabled.
Read more >
HMR API - Vite
A module that "accepts" hot updates is considered an HMR boundary. Note that Vite's HMR does not actually swap the originally imported module:...
Read more >
este/este - Gitter
locals[0] does not appear to be a `module` object with Hot Module replacement API enabled. ... It seems there is an issue with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found