Route loading issue causing app reload. Can't access hooks before initialization in production.
Hello, after our latest deployment we are getting issues with navigation in our SPA. For some reason the production build has trouble initializing module dependencies between routes and causes the app to reload on navigation attempts. We can't use the navigation but we can access the routes when visiting the URLs directly. The name of the app is stock-keeper.

5 Replies
Hello,
Could you please share the URL of your application so that I can help take a look?
Sure it's stock-keeper.gadget.app
We proceeded to migrate to React Router 7 however. So this may not be an issue anymore.
It's an embedded shopify app.
Oh sorry, I missed the app URL at the bottom of the message
I'll still take a look at it to see what the issue might have been
I've only tested web components in SSR personally so there might be some considerations in SPA
If it helps, we upgraded the framework from 1.4.0 to 1.5.0
Might have been many breaking changes as we have had our app from early stages of gadget. Right now we are refactoring the code so it can work in SSR. It has been on the way a while now so might as well do it now.
I don't think that the errors you shared would be linked to the framework version change. I haven't had the chance to look into this further but will come back to it soon