-
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
Metro is not detecting newly created folders in development builds #36511
Comments
|
This seems similar to: #36387 |
Please install Watchman. Windows users without Watchman are facing this bug with the RN versions > 0.71.1. |
@nithianandan90 kindly see my
|
@ashuvssut - it may be the case that Watchman is installed but not being used. If Watchman is installed but not being used, that in itself sounds like an issue worth debugging. Could you paste the output of |
@robhogan as I mentioned in the issue, my issue is solved by using metro bundler v0.76.0 Here are the 2 logs.
1.
|
Thanks for the info!
Are the logs you've given using The concern for me is that with Watchman installed and working, #36387 shouldn't apply to you. So this sounds like a different bug - either Watchman isn't properly detected when you use 0.73.8, or there's an issue with the Watchman backend in your case. It's great that 0.76.0 works for you but I want to make sure we catch and backport any bugs in 0.73.x. Appreciate your help! |
I have the same issue. |
Description
Summary
Metro is not detecting newly created folders. I need to restart the bundler after creating a new folder in order to use the folder --- like first add
.ts/.js/.tsx/.jsx
files in the folder and import stuff from them.I am using react-native 0.71.4
This issue lies with metro v0.73.8 that is shipped with React Native v0.71.4
In all my expo & non-expo (vanilla react native) project this issue exists where react native version is 0.71.4
my previous non-expo react native v0.68.1 project does not has these issues.
What is the fix I used?
I am using metro bundler 0.76.0 in my app which fixes this issues. I am opening this issue to notify the problems I faced with the metro bundler 0.73.8 that is being shipped with react native 0.71.4
Explanation: How I found out that metro is not detecting new folder?
Whenever I create a new
.ts/.js/.tsx/.jsx
file in<expo-proj-root>/src/
the app correctly loads the newly created.ts/.tsx
file (I can see the "Refreshing..." toast on my app)Now the metro server is running.
BUT whenever I created a new folder (let's say
some-folder
) like<expo-proj-root>/src/some-folder
and add a file inside it (saysome-folder/abc.ts
) , that newly created file is not loading in my app (there is no "Refreshing..." toast on my app)I get this following error:
Unable to resolve "./src/some-folder/abc" from "App.tsx"
But when restart the Metro bundler and reload the app, this error is gone.
Stacktrace (if a crash is involved)
Full error stack trace
React Native Version
0.71.4
Output of
npx react-native info
Steps to reproduce + link to a repository
I have pushed the minimal repro demo at https://github.com/ashuvssut/expo-dev-client-bug-repro
Read the README given at that repo to get the reproducible steps
The text was updated successfully, but these errors were encountered: