React-native: Enable Hot Reloading - Requiring unknown module "./node_modules\react-transform-hmr\lib\index.js".

Created on 13 Apr 2016  路  11Comments  路  Source: facebook/react-native

Hi there,

I am trying to run the reactive native on my window machine.

When I enable the hot reloading, the Emulator will show an error message - Requiring unknown module "./node_modules\react-transform-hmr\lib\index.js".

And, please take note that index.js is available on "TestReact\node_modules\react-transform-hmr\lib" (note: TestReact is the project name)

Please find attached for the screenshot. Thanks!
enablehotreloading
rederror
thejsfile

Windows Locked

Most helpful comment

@malinthe It should be in 0.24.0 (https://github.com/facebook/react-native/commit/d457a187666ec3211e8d17bf51c2b07d049cd5bf), but I am getting this error too:
screenshot_2016-04-19-15-29-34-message

It seems to me that the fix is also contained in babel-preset-react-native, which has not been released yet.

According to npm, the current version (1.5.6) was published by @martinbigio 3 weeks ago.

@ide When babel-preset-react-native will be released?

All 11 comments

Looks like a problem with the slashes in the path.

/cc @martinbigio

I, also, am having this issue after upgrading to 0.23

Yeah, the problem is the ./. Is there an equivalent thing on windows?

This is the line we'd need to change: https://github.com/facebook/react-native/blob/master/babel-preset/configs/hmr.js#L19

That patch has been pulled into 0.24.0-rc5 (react-native@next). 0.24.0 will go out next Monday. Closing this out.

@ide no need to pull it into the RC. The preset is a separate npm module. We need to publish it to npm :)

There were some changes to the packager in that commit, too. It was early in the RC window so I cherry picked the patch anyway and figured people would appreciate it.

Oh right, didn't see them. Thanks for doing that!. We'd still need to release a new version of the preset.

@ide and @martinbigio thanks. please advise when will you publish to npm?

Is this on 0.24 now? Updated to 0.24 today but still seeing the issue.

@malinthe It should be in 0.24.0 (https://github.com/facebook/react-native/commit/d457a187666ec3211e8d17bf51c2b07d049cd5bf), but I am getting this error too:
screenshot_2016-04-19-15-29-34-message

It seems to me that the fix is also contained in babel-preset-react-native, which has not been released yet.

According to npm, the current version (1.5.6) was published by @martinbigio 3 weeks ago.

@ide When babel-preset-react-native will be released?

Was this page helpful?
0 / 5 - 0 ratings