Skip to content
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

Nuxt does not register classes in superjson after building #23183

Closed
Q16solver opened this issue Sep 13, 2023 · 5 comments
Closed

Nuxt does not register classes in superjson after building #23183

Q16solver opened this issue Sep 13, 2023 · 5 comments

Comments

@Q16solver
Copy link

Q16solver commented Sep 13, 2023

Environment

  • Operating System: Windows_NT
  • Node Version: v20.5.1
  • Nuxt Version: 3.7.2
  • CLI Version: 3.8.3
  • Nitro Version: -
  • Package Manager: npm@9.8.0
  • Builder: -
  • User Config: alias, css, build, nitro, vite, typescript, imports, runtimeConfig, modules, authJs, googleFonts, pinia, unocss
  • Runtime Modules: @hebilicious/authjs-nuxt@0.3.0, @nuxtjs/google-fonts@3.0.2, @pinia/nuxt@0.4.11, @unocss/nuxt@0.55.7, @vueuse/nuxt@10.4.1
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/github-wn9aqn-sxviyo

  1. Run npm run build
  2. Run npm run start or node .output/server/index.mjs
  3. Observe in Console tab that there is an error TRPCClientError: Unable to transform response from server.

Describe the bug

I want to use trpc with superjson for transforming json data and classes, but it seems like the registered classes work in development but after build, it only runs on one-side (the api endpoint returns the right json + metadata in the network request) but trpc fails to transform it on the server, most likely somehow not registering the classes.

linked discussion in trpc: trpc/trpc#4790

Additional context

No response

Logs

No response

@stackblitz
Copy link

stackblitz bot commented Sep 13, 2023

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@kylegl
Copy link

kylegl commented Jan 17, 2024

Hey I am running into this as well. Any luck figuring it out?

@danielroe
Copy link
Member

Would you see if you can reproduce this in pure Nitro (reproduction sandbox), and if so, raise there? 🙏

@kylegl
Copy link

kylegl commented Jan 17, 2024

Im not quite sure how to do that but i'll see what i can do

@danielroe
Copy link
Member

Closing as I'm pretty sure this is a Nitro-related issue and not a Nuxt one. If it only recurs with Nuxt, let me know and I'll reopen it here.

@danielroe danielroe closed this as not planned Won't fix, can't repro, duplicate, stale Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants