-
Notifications
You must be signed in to change notification settings - Fork 113
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
Feature Request: Unmatched route (Page not found) - warn when missing default export #576
Comments
I kind of found the issue: It seems the metro is not detecting any changes in the /app folder, no matter which project, I tried:
metro doc says pass module.exports = { ...getDefaultConfig(__dirname), resetCache: true }; In the I also removed the metro.config.js, in which it inherits the default config from expo/metro-config, expo-router/metro seems not there? i do not know which one partially fixed it at this point 🤣 we need to have an easier way to completely nuke whatever metro has been cached... -======= tried again, although the file is being detected, but the changes to the file are not detected at all.... |
Yeah - I cannot get it to work either. Have cleaned the project & rebuilt many times with no luck. Tested with adding dummy files in the root path under the app folder, but no routing luck. All giving the 404 error |
Nvm - this was due to not exporting function as default. Rough |
@smalik02 thanks, mate, that's a hard one😅 Must be an error when copying and pasting! |
Consider the human error is hard to eliminate but mitigate, file A in app folder has no default export, do you miss it? Which would make it super easy to debug. |
I also lost about 1hr because of this.
instead of
I know it's written in the docs |
Thanks! This fixed my error. I forgot to write default for my home route. |
Lost close to a day of debuging, a warning at least would help |
Which package manager are you using? (Yarn is recommended)
npm
Summary
here is the structre
---Stack
------(main-tabs)
---------tab1
------clip
---------[clipId]
You can see that (main-tabs) and clip sits at the same level
when I go to
[clipId]
fromtab1
, I got that errorMinimal reproducible example
Here is the demo (expo-router: 1.7.1):
https://github.com/Albert-Gao/expo-router-dynamic-route
The text was updated successfully, but these errors were encountered: