Weird problem with Nuxt SSR #1931
Unanswered
andamansunda
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, first I would like to thank you all for your work on this project. I really love it!
I have come across a problem with SSR in Nuxt. I tried to create a reproduction of an error, but I was not able to recreate it. But I can explain the problem. I have an api call in the <script setup> block, the results of that api call are then saved in a repo:
If I navigate to this page from another page, everything works great, but if I put the url for this page in the browser, then I get a 500 error when the site is in production. I also get a 500 error after running pnpm run build and pnpm run preview. However, when the site is in development mode, there is no error. This is then printed in the console when the error comes up in production:
[nitro] [unhandledRejection] TypeError: Cannot read properties of undefined (reading '_s') at useStore (/Users/daniel/workspace/.output/server/node_modules/pinia/dist/pinia.prod.cjs:572:20) at Query.commit (file:///Users/daniel/workspace/.output/server/node_modules/pinia-orm/dist/index.mjs:801:90) at Query.saveElements (file:///Users/daniel/workspace/.output/server/node_modules/pinia-orm/dist/index.mjs:1349:30) at Query.save (file:///Users/daniel/workspace/.output/server/node_modules/pinia-orm/dist/index.mjs:1340:13) at Proxy.save (file:///Users/daniel/workspace/.output/server/node_modules/pinia-orm/dist/index.mjs:1937:25) at Object.onResponse (file:///Users/daniel/workspace/.output/server/chunks/build/index-DHvfP4n9.mjs:818:25) at $fetchRaw2 (file:///Users/daniel/workspace/.output/server/chunks/runtime.mjs:3752:29) at async $fetch2 (file:///Users/daniel/workspace/.output/server/chunks/runtime.mjs:3763:15) at async loadCaseStudies (file:///Users/daniel/workspace/.output/server/chunks/build/index-DHvfP4n9.mjs:811:7)
Could anyone help out with this? I don't know where to begin with debugging this.
Beta Was this translation helpful? Give feedback.
All reactions