react-native: react-native 0.57.0-rc.0 - Error: ENOENT: no such file or directory [Windows]

Environment

[skip envinfo] Windows 10, trying to run on Android.

Description

Tried to run the newest NPM package of 0.57.0-rc.0 (Hoping it would fix AccessibilityInfo error) I ran into this error instead:

 BUNDLE  [android, dev] ./index.js ░░░░░░░░░░░░░░░░ 0.0% (0/1)::ffff:127.0.0.1 - - [17/Aug/2018:11:25:37 +0000] "GET /index.delta?platform=android&dev=true&minify=false HTTP/1.1" 500 - "-" "okhttp/3.10.0"
error: bundling failed: Error: ENOENT: no such file or directory, lstat 'D:\Development\Action Menu\testVersion2\node_modules\react-native\scripts\index.js'
    at Object.realpathSync (fs.js:1657:15)
    at DependencyGraph.getSha1 (D:\Development\Action Menu\testVersion2\node_modules\metro\src\node-haste\DependencyGraph.js:236:29)
    at D:\Development\Action Menu\testVersion2\node_modules\metro\src\Bundler.js:203:56
    at Generator.next (<anonymous>)
    at step (D:\Development\Action Menu\testVersion2\node_modules\metro\src\Bundler.js:11:657)
    at D:\Development\Action Menu\testVersion2\node_modules\metro\src\Bundler.js:11:817
    at <anonymous>
 BUNDLE  [android, dev] ./index.js ░░░░░░░░░░░░░░░░ 0.0% (0/1), failed.

Reproducible Demo

Run:

react-native init --version="0.57.0-rc.0" testVersion cd testVersion react-native run-android

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 6
  • Comments: 44 (20 by maintainers)

Commits related to this issue

Most upvoted comments

Hey folks thank for reporting, just double checked locally (on macOS) and it seems to me that it’s not just Windows related (I’ll remove the label) - I get this error /testVersion/node_modules/react-native/scripts/packager.sh: No such file or directory

My current hypotesis is that it’s something outdated in the react-native run-xxx command, that instead of running the “latest” version of the command > node node_modules/react-native/local-cli/cli.js start runs an outdated version (that points to an old reference that is not there anymore).

Can you try to run npm start to manually start the packager and then in a second window run the react-native run-xxx command again?

I made the fix as discussed above on line 365 of runAndroid.js

It’s does eliminate that error, but i’m left with this error androiderror

Also, as I mentioned earlier, this has workaround. You can use npm run start to start the dev server.

Are you guys trying to repro on Windows?

On Sat, Aug 25, 2018, 3:27 AM Jiawen Geng notifications@github.com wrote:

Can you provide an repro repo ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/facebook/react-native/issues/20712#issuecomment-415948449, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKzMquBoabdSAfpWaTvpHd98Xatzt1Fks5uUPxQgaJpZM4WBaWZ .

Waiting for stable version…