Skip to content

Can't run freshly generated app: react-transform-hmr/lib/index.js could not be found #698

@sryze

Description

@sryze

Description

I created a new project and tried to run it on an Android device connected to the computer (it has been authorized for debugging over ADB).

create-react-native-app MyApp
cd MyApp
yarn run android

After doing this I receive the following error on every launch:

21:07:51: Unable to resolve ./F:/Projects/Android/MyApp/node_modules/react-transform-hmr/lib/index.js" from "./C:\\Users\\szx\\Projects\\Android\\MyApp\\App.js`: The module `./F:/Projects/Android/MyApp/node_modules/react-transform-hmr/lib/index.js` could not be found"
21:07:51: Failed building JavaScript bundle

(same error on screen as well)

Expected Behavior

Expected the app to be started on the device.

Observed Behavior

Got this error:

Logs from serving your app will appear here. Press Ctrl+C at any time to stop.

21:07:51: Unable to resolve ./F:/Projects/Android/MyApp/node_modules/react-transform-hmr/lib/index.js" from "./C:\\Users\\szx\\Projects\\Android\\MyApp\\App.js`: The module `./F:/Projects/Android/MyApp/node_modules/react-transform-hmr/lib/index.js` could not be found"
21:07:51: Failed building JavaScript bundle
Building JavaScript bundle [=====================================================================================               ] 85%

The progress bar stops at 85% every time.

Environment

  • npm ls react-native-scripts:

    `-- (empty)

  • npm ls react-native:

    `-- react-native@0.55.4

  • npm ls expo:

    `-- expo@27.1.0

  • node -v:

    v8.9.4

  • npm -v:

    5.6.0

  • yarn --version:

    1.5.1

  • watchman version:

bash: watchman: command not found

Also specify:

  1. Operating system:

    Microsoft Windows 10 Home
    10.0.17134 Build 17134

  2. Phone/emulator/simulator & version:

    Android 4.4 KitKat

Reproducible Demo

https://drive.google.com/file/d/1t4UE19-cgZDzrcKt8pJzsWwy0mOt8Lqu/view?usp=sharing

Metadata

Metadata

Assignees

No one assigned

    Labels

    moving-to-expo-cliThe issue tracker has been moved to expo/expo-cli. Please file bugs in the Expo CLI repository now.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions