react-native: react-native 0.57.0-rc.0 - Error: ENOENT: no such file or directory [Windows]
- Review the documentation: https://facebook.github.io/react-native
- Search for existing issues: https://github.com/facebook/react-native/issues
- Use the latest React Native release: https://github.com/facebook/react-native/releases
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
- Fixes #20712 on unix-like OS (#20751) Summary: add `packager.sh` for run-android task for unix like system. This only fix on linux and macOS. pass all current ci. none [GENERAL] [BUGFIX] [CLI] - add... — committed to facebook/react-native by gengjiawen 6 years ago
- Fix default projectRoot + watchFolders computation Summary: @public This diff fixes the `projectRoot` calculation on React Native when the app does not have a config file. This should fix the issues... — committed to facebook/react-native by rafeca 6 years ago
- Fix default projectRoot + watchFolders computation Summary: @public This diff fixes the `projectRoot` calculation on React Native when the app does not have a config file. This should fix the issues... — committed to facebook/react-native by rafeca 6 years ago
- Fix default projectRoot + watchFolders computation Summary: @public This diff fixes the `projectRoot` calculation on React Native when the app does not have a config file. This should fix the issues... — committed to aleclarson/react-native by rafeca 6 years ago
- Fixes #20712 on unix-like OS (#20751) Summary: add `packager.sh` for run-android task for unix like system. This only fix on linux and macOS. pass all current ci. none [GENERAL] [BUGFIX] [CLI] - add... — committed to aleclarson/react-native by gengjiawen 6 years ago
- Fix default projectRoot + watchFolders computation Summary: @public This diff fixes the `projectRoot` calculation on React Native when the app does not have a config file. This should fix the issues... — committed to aleclarson/react-native by rafeca 6 years ago
- Fix default projectRoot + watchFolders computation Summary: @public This diff fixes the `projectRoot` calculation on React Native when the app does not have a config file. This should fix the issues... — committed to aleclarson/react-native by rafeca 6 years ago
- Fixes #20712 on unix-like OS (#20751) Summary: add `packager.sh` for run-android task for unix like system. This only fix on linux and macOS. pass all current ci. none [GENERAL] [BUGFIX] [CLI] - add... — committed to microsoft/react-native-macos by gengjiawen 6 years ago
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 thereact-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
Also, as I mentioned earlier, this has workaround. You can use
npm run start
to start the dev server.@kelset PR created: https://github.com/facebook/react-native/pull/20751.
Are you guys trying to repro on Windows?
On Sat, Aug 25, 2018, 3:27 AM Jiawen Geng notifications@github.com wrote:
Waiting for stable version…