-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
None of these files exist: Metro is not detecting files in newly created directories on Windows, Linux for 0.71 #36387
Comments
What is the error you are getting? I see all this explanation, but unsure what exact error you are dealing with. |
I just started a new React Native (0.71.3) project from scratch and facing a similar issue. I will try to explain it better: My Project Structure is simple with this kind of a structure:
|
@bagraercan - This sounds like Watchman is not able to crawl/detect changes to FS, which might explain those errors. Does |
It seems android sdk not found but it is already installed. I can work on other android apps. |
hello @bagraercan if you exported it with default (export default homeScreen) then no need to provide { } brackets in the time of import, and it is just advice to give proper file name, so it will be easy read and understand like "homeScreen.js" |
Hi @priyaWedo i export it as |
I wanted to report a similar issue occurring on my end as well - I was having issues importing images for use and had everything correctly configured to my knowledge, but running @bagraercan , did you try allowing the |
After the Edit: Currently i installed Android SDK Command-line tools in Android studio and now it finds the Android Sdk. So, |
I am also getting same error after try to include file under folder app inside root folder of app
npx react-native doctor Android Errors: 0 if anyone able to solve this, please update |
Can anyone please let me know if they can solve this |
I'm also getting this error, creating a new project with react native 0.71+ every time I create new components it points out the error (none of these files exist, error) but if I stop running the project and run it again then it works perfectly. |
Yes it works that way but it's annoying to reboot all the time. |
I'm also having this error, I'm having to restart the project every time I create components and import them in other places, it's unbearable |
managed to solve the problem? |
@bagraercan Sorry to hear about your issue -- were you following the instructions for Windows, Android on the docs from the "React Native CLI Quickstart"? Have you been able to start a React Native application before and this is a regression for 0.71? Or is this your first attempting? |
Hi @lunaleaps yes, i have followed the documentation you mentioned above. I made some test with earlier versions like 0.69 and 0.70, i do not get this error. It happens only in 0.71.. |
I am facing the same issue and I also have projects on older version of React Native (0.61.5) which has no issues like this. I am facing this issue on a brand new React Native setup (0.71.3) |
Are folks having this problem exclusively on Windows? |
yes i think so |
no, in my case i am using POP OS operating system, linux. |
i am getting same issue while running on windows 10 and ubuntu 22.04 OS |
Same issue. Windows 11 react native 0.71.4 |
I faced same issue and fixed it as following temporarily and annoying solution.
|
Update: This is now fixed in React Native 0.71.5 - the best solution is to update. Apologies for this and thanks for all the reports, we've tracked this down to a bug introduced in Metro 0.73.6, which affects all versions of React Native since 0.71.1 (inclusive). We'll prepare a fix for release with React Native 0.71.5. Impact
Affected users
WorkaroundsEither installing Watchman or using an unaffected version of Install WatchmanWatchman is available for all platforms - see installation instructions for options. Override
|
Summary: Cherry pick the new integration test covering facebook/react-native#36387 from #949 Pull Request resolved: #950 Reviewed By: huntie Differential Revision: D44254000 Pulled By: robhogan fbshipit-source-id: 10d202ec153b55e8ecbe282d0b907fabee0fe5b6
Fix published with https://github.com/facebook/react-native/releases/tag/v0.71.5. |
|
I am having an issue: am using Mac: here is my error Unable to resolve module ../screens/SearchResults from /Users/blessedboy/Desktop/clone/Uber/src/navigation/Home.js: None of these files exist:
RCTFatal |
Any update @Honorroads, I'm having a similar issue and I can't find a fix |
I highly doubt this will help... and I am working on Mac Monterey but I struggled for several hours, but I had ALL of the same problems. Metro Version 76.7 and it would never recognize the sdk changed directories, and got the same issue with the SDK N/A. After changing paths back and forth I tried ---- npx react-native start --reset-cache ---- and suddenly it found the SDK. Sorry if it doesn't help, but it fixed my issue. |
Description
Hi everyone,
i have followed official react-native docs https://reactnative.dev/docs/environment-setup and have just created a new react-native app and unfortunately had a strange problem.
It cannot find the files which are clearly in the app structure.
The error
My project structure
App.tsx
metro.config.js
package.json
I saw the same problem which other developers asked but none of the solutions fixed my problem.
if i use yarn cache clean and restart the application, it will work for the directory that i had the problem but if i make another folder and file under src, it will crash again.
I have also created some react-native apps earlier but never had a problem like this.
Can you please help me on this?
React Native Version
0.71.3
Output of
npx react-native info
System:
OS: Windows 10 10.0.19044
CPU: (12) x64 Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
Memory: 4.32 GB / 15.77 GB
Binaries:
Node: 16.14.2 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
npm: 7.17.0 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: AI-212.5712.43.2112.8512546
Visual Studio: Not Found
Languages:
Java: 11.0.18 - C:\Program Files\Microsoft\jdk-11.0.18.10-hotspot\bin\javac.EXE
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: 0.71.3 => 0.71.3
react-native-windows: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
create another folder and file under src and re-run the app
Snack, code example, screenshot, or link to a repository
https://github.com/bagraercan/rn-rud
The text was updated successfully, but these errors were encountered: