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

HMR fails to load "node_modules/react-transform/hmr/lib/index.js" on 0.24.0-rc #6798

Closed
ide opened this issue Apr 4, 2016 · 9 comments
Closed
Assignees
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@ide
Copy link
Contributor

ide commented Apr 4, 2016

When enabling HMR on 0.24.0-rc in a brand new template project, we get a redbox that says:

Requiring unknown module "node_modules/react-transform/hmr/lib/index.js". If you are sure the module is there, try restarting the packager or running "npm install".

screenshot 2016-04-04 12 44 21

I verified that node_modules/react-transform/hmr/lib/index.js exists, and running npm start -- --reset-cache doesn't resolve the issue either.

Repro steps: run ./scripts/test-manual-e2e.sh which sets up a new project and launches it in Android (need to have a simulator or device connected in advance). Enable HMR from the dev menu to get the redbox.

@martinbigio
Copy link
Contributor

@ide /scripts/test-manual-e2e.sh are not run on CI, right?

@ide
Copy link
Contributor Author

ide commented Apr 4, 2016

@martinbigio I believe that's correct. I ran the script with 0.24.0-rc on my MBP (OS X 10.11.4) with Node 5.9.1.

@mkonicek
Copy link
Contributor

mkonicek commented Apr 4, 2016

No tests for HMR on CircleCI yet but @bestander is working on it 🎉

@martinbigio
Copy link
Contributor

ok, I'l try to take a look tomorrow, not sure what broke this. Does this also affect hmr while developing or only this e2e tests?

@ide
Copy link
Contributor Author

ide commented Apr 4, 2016

I believe this happens when developing too. The manual E2E tests set up a new project with react-native init and launch the new Android/iOS app. Then I manually opened the dev menu and turned on HMR and got the error.

@martinbigio
Copy link
Contributor

The problem was that we were using an old version of the preset due to this commit bc54a45.

The preset @1.5.2 doesn't include this fix: 3a1634e

cc @janicduplessis @bestander

@bestander
Copy link
Contributor

Ok, #6814 should propagate in an hour.
We may want to cherry-pick it into 0.24.0, @ide

@martinbigio
Copy link
Contributor

It's already on the list #6800 :)

ghost pushed a commit that referenced this issue Apr 5, 2016
Summary:See #6798
Closes #6814

Differential Revision: D3138776

fb-gh-sync-id: f43404e7bfdf0e3e7c6df16681653d1dd4016e1a
fbshipit-source-id: f43404e7bfdf0e3e7c6df16681653d1dd4016e1a
@ide
Copy link
Contributor Author

ide commented Apr 5, 2016

Thanks for the heads-up. I've cherry-picked it into 0.24-stable (tested -- HMR works) and will do another RC release after the fix for the AssetRegistry lands (#6822).

@ide ide closed this as completed Apr 5, 2016
ide pushed a commit that referenced this issue Apr 6, 2016
Summary:See #6798
Closes #6814

Differential Revision: D3138776

fb-gh-sync-id: f43404e7bfdf0e3e7c6df16681653d1dd4016e1a
fbshipit-source-id: f43404e7bfdf0e3e7c6df16681653d1dd4016e1a
zebulgar pushed a commit to nightingale/react-native that referenced this issue Jun 18, 2016
Summary:See facebook#6798
Closes facebook#6814

Differential Revision: D3138776

fb-gh-sync-id: f43404e7bfdf0e3e7c6df16681653d1dd4016e1a
fbshipit-source-id: f43404e7bfdf0e3e7c6df16681653d1dd4016e1a
@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 19, 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

5 participants