-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Remix V1 to V2: Error console logs a weird issue but everything works fine #7593
Comments
I've tried the following:
|
I am getting this same error on hot reloading randomly |
Can anyone provide a reproduction repo or stackblitz of this issue? |
I'm also seeing this error during HMR after upgrading from |
@brophdawg11 After a bit of experimentation it seems that after removing: routes(defineRoutes) {
return createRoutesFromFolders(defineRoutes, {
//Our convention is to not consider anything under the routes/**/components to be a route.
ignoredFilePatterns: ignoredRoutePatterns
});
} from my remix.config.js file the error goes away. After an investigation I have figured out the root cause of this, at least for my case, before version 2 we had a route that had exports before but we commented out everything so the route didn't export anything anymore, you can find the exact reproduction here: This worked in v1 without console logging an error but now it logs the reported error above, I am not sure if this is expected behavior or not, after commenting back in an export of a loader it goes away. |
I'm using https://github.com/kiliman/remix-flat-routes which requires ignoring all regular route files and using the |
Ahh, ok thank you for tracking that down @AlemTuzlak. We ran into something like this before and looks like we need the same fix in another spot or two. The We have this check for lazily loaded routes to avoid assigning the default If anyone wants to take a stab at this it should be something we can assert via the console in a playwright test and a pretty simple fix. Otherwise I'll get a fix in once I wrap up some current stuff I'm focused on. |
@nmackey Definitely tag me if you think this is a bug in |
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
What version of Remix are you using?
v2.0.1
Are all your remix dependencies & dev-dependencies using the same version?
Steps to Reproduce
My entry.server.ts:
My remix.config.js:
my Remix dev server command:
Expected Behavior
There is no error in the console, everything works fine.
Actual Behavior
So a little context, we have a 1.19.3 app running on cjs. After upgrading it to v2 everything is working fine BUT we keep getting this error whenever we start the dev server OR hard reload the page, between navigations it works fine. Any idea what might be causing this?
I run the dev server, everything works fine but I get the following error:
The text was updated successfully, but these errors were encountered: