Replies: 1 comment
-
|
Closing:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Pretty much every time I add a new file like loader.tsx or page.tsx to my app router, I get this error:
Invariant: Expected to replace at least one importI'm not sure what it means, but the only way to make it go away, is to restart my dev server, however:
The other issue here is, if I reload it and initially go to the root path
/the error is there again, but if I restart and initially go to a subpath/123then it goes away and I can use the dev server normally again.This seems to be related to using a
[...slug]folder at the root of the project...So regardless of if I change anything after the error occurs, it's what I do after I restart the dev server that determines whether an error shows up, and keeps showing up...
I can't be the only one getting this same error?
Additional information
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions