Skip to content

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

Closed

Description

@ide

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.

Activity

  1. martinbigio commented on Apr 4, 2016

    @martinbigio
    Contributor

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

  2. ide commented on Apr 4, 2016

    @ide
    ContributorAuthor

    @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.

  3. mkonicek commented on Apr 4, 2016

    @mkonicek
    Contributor

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

  4. martinbigio commented on Apr 4, 2016

    @martinbigio
    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?

  5. ide commented on Apr 4, 2016

    @ide
    ContributorAuthor

    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.

  6. martinbigio commented on Apr 5, 2016

    @martinbigio
    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

  7. bestander commented on Apr 5, 2016

    @bestander
    Contributor

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

  8. martinbigio commented on Apr 5, 2016

    @martinbigio
    Contributor

    It's already on the list #6800 :)

  9. ghost added a commit that references this issue on Apr 5, 2016
  10. ide commented on Apr 5, 2016

    @ide
    ContributorAuthor

    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).

  11. added a commit that references this issue on Apr 6, 2016
  12. locked as resolved and limited conversation to collaborators on May 24, 2018
  13. added
    Resolution: Locked
    on Jul 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Resolution: Locked

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions