Weird errors (only in production) with following structure
I have the following routes:
- /player/$playerId/info
- /player/$playerId/events
- /player/$playerId/economy
- /player/$playerId/ redirects beforeLoad to /player/$playerId/info
so in this case /player/$playerId is a route with some default information from the player (coming from api) set on every page + navigation to the different subroutes.
So basically /player/$playerId.tsx acts as a layout route with information shared on the different pages.
This works just fine on local dev, but on production I get these weird errors: "Error: Invariant failed"
5 Replies
multiple-amethyst•16mo ago
please try to reproduce by forking one of our examples on stackblitz
absent-sapphireOP•16mo ago
but it only happens when running the production build? Can I do that with stackblitz
multiple-amethyst•16mo ago
I'd take a github repo then 😅
foreign-sapphire•16mo ago
Any news ? Looks like I got the same problem
Not the same error as I noticed, looks like mine was introduced in 1.35.6
absent-sapphireOP•16mo ago
For me it was related to the link component. I had a reusable nav, where I passed props set on <Link/> that stopped working
@Maqui. Instead I now pass the entire link components as props as a temporary workaround.