-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
react-native 0.57.0-rc.0 - Error: ENOENT: no such file or directory [Windows] #20712
Comments
Have the same issue: BUNDLE [android, dev] ./index.js ░░░░░░░░░░░░░░░░ 0.0% (0/1)::ffff:127.0.0.1 - - [17/Aug/2018:13:11:28 +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:\Developer\FrontEnd\test_057\node_modules\react-native\scripts\index.js'
at Object.realpathSync (fs.js:1430:7)
at DependencyGraph.getSha1 (D:\Developer\FrontEnd\test_057\node_modules\metro\src\node-haste\DependencyGraph.js:236:29)
at D:\Developer\FrontEnd\test_057\node_modules\metro\src\Bundler.js:203:56
at Generator.next (<anonymous>)
at step (D:\Developer\FrontEnd\test_057\node_modules\metro\src\Bundler.js:11:657)
at D:\Developer\FrontEnd\test_057\node_modules\metro\src\Bundler.js:11:817
at process._tickCallback (internal/process/next_tick.js:68:7) |
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 My current hypotesis is that it's something outdated in the Can you try to run |
You can use |
And I also tried the android release build, works too. |
The bundler, when spawned from "react-native run-android", looks in node_modules/react-native/scripts first, when I interpret the message correctly. See screenshot (unfortunatly I can not mark© text in that window): When I use "react-native start", only the project-dir is searched (but 3 times??):
The good news is, that 0.57.0-rc.0 seems to fix #20353 (I would comment that there, however that issue is locked....) |
Fixing this seems easy, when I replace
with
"react-native run-android" works (on windows), because otherwise the scripsDir is taken as projectRoot for the packager, since that is the default-value in react-native/local-cli/core/index.js Line 59 in 625c54d
At least if I understand the code correctly here, it's the first time I look into the react-native-code ;-) |
Hey Tim, thanks for the investigation, it seems to be in line with my hypothesis. Want to try and submit a PR for it? I feel like the same error will be found on the runIOS file |
I tried what @timri did with the
Edit: For some reason it didn't work for me the other day, but I just tested it today and it worked! |
I'm on Windows 10 and Tried as @timri suggested
Line 365 in 625c54d Worked for me.. |
This comment has been minimized.
This comment has been minimized.
Ok, so. I spent some time trying to understand what this is caused by and I found two "different" issues. First one, basically on macOS when error: bundling failed: Error: ENOENT: no such file or directory, lstat '/private/tmp/RNTestProject/node_modules/react-native/index.js'
at Object.realpathSync (fs.js:1421:7)
at DependencyGraph.getSha1 (/private/tmp/RNTestProject/node_modules/metro/src/node-haste/DependencyGraph.js:236:29)
at /private/tmp/RNTestProject/node_modules/metro/src/Bundler.js:203:56
at Generator.next (<anonymous>)
at step (/private/tmp/RNTestProject/node_modules/metro/src/Bundler.js:11:657)
at /private/tmp/RNTestProject/node_modules/metro/src/Bundler.js:11:817
at process._tickCallback (internal/process/next_tick.js:68:7) The second issue is related to the bundler, and I think I figured out why, or, at least, which commit may be related to the issue. Looking at the history for Two more people who may have a better understading of why the |
This comment has been minimized.
This comment has been minimized.
The |
This comment has been minimized.
This comment has been minimized.
@gengjiawen I don't think it "strictly" affects this issue, it's simply something that I found out during my investigation (so, like, a side issue) - but I think that then we need to reverse that change to re-add that file. Would it be possible? |
Okay, I will create a pr, I removed it because I the file is redundant at that time. |
Also, as I mentioned earlier, this has workaround. You can use |
I checked the log again, looks like metro find the wrong project roots. cc @rafeca
|
I'm getting a different error but related to Metro also (on Windows), after upgrading to 0.57.0-rc.0:
|
Looks like @rafeca committed a fix for this, we have cherry picked it and will be out with rc3. In the meantime, can anyone test if master is now fixed? |
@zenz I just tested locally myself and I can confirm that Rafael's commit fixes the To test them you need to git clone the repo, checkout to the 0.57 branch and then run Probably you didn't clean your project properly while testing? Anyway, I think we'll proceed soon to release a rc3 version so that we can make sure it works fine for everyone. |
@kelset I did what you said, no luck. and .sh file is only workable under *nix, not windows. |
Fixed on rc3. I have verified using |
I installed "0.57.0-rc.3" and I still have the error registerevents which is mentioned by @dmead |
Is it a clean install, or an upgraded project ? |
Clean install |
Can you provide a reproduce repo ? |
Are you guys trying to repro on Windows?
…On Sat, Aug 25, 2018, 3:27 AM Jiawen Geng ***@***.***> wrote:
Can you provide an repro repo ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#20712 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAKzMquBoabdSAfpWaTvpHd98Xatzt1Fks5uUPxQgaJpZM4WBaWZ>
.
|
@dmead I am using Windows 10 and still have this issue with 0.57.0-rc.3 |
I confirmed that 0.57.rc3 solved the problem. under windows 10. |
@gengjiawen Here's the repo https://github.com/chakrihacker/testRc3 which I created with this |
@chakrihacker I download your app and do react-native run-android, it's running well. I think you should check your system configuration. |
My react-native-cli version is 2.0.1 and I am using react-native for past 6 months and my latest is on 0.55.4, what system configuration should I check? I have the same error what @timri had |
@chakrihacker did you use yarn for package management? or npm? which version? |
I'm using yarn 1.9.4 with same android build-tools and platform. I am getting this error |
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 reported in facebook#20712 Reviewed By: hramos Differential Revision: D9444982 fbshipit-source-id: 4cb41fa5224d2addf92976cc119e49dea6a6346b
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 `packager.sh` back for run-android task Pull Request resolved: facebook#20751 Differential Revision: D9398197 Pulled By: hramos fbshipit-source-id: 213b066c0c034136c5ad5bbf8d45c6f331b1d185
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 reported in facebook#20712 Reviewed By: hramos Differential Revision: D9444982 fbshipit-source-id: 4cb41fa5224d2addf92976cc119e49dea6a6346b
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 reported in facebook#20712 Reviewed By: hramos Differential Revision: D9444982 fbshipit-source-id: 4cb41fa5224d2addf92976cc119e49dea6a6346b
@chakrihacker Did you get this resolved? |
It's working, you can close this issue |
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 `packager.sh` back for run-android task Pull Request resolved: facebook#20751 Differential Revision: D9398197 Pulled By: hramos fbshipit-source-id: 213b066c0c034136c5ad5bbf8d45c6f331b1d185
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:
Reproducible Demo
Run:
react-native init --version="0.57.0-rc.0" testVersion
cd testVersion
react-native run-android
The text was updated successfully, but these errors were encountered: