Composition-api: SSR issue moving from v0.21.0 to v0.22.0

Created on 31 Mar 2021  路  12Comments  路  Source: nuxt-community/composition-api

On SSR getting the following error:

Screenshot 2021-03-31 at 13 50 35

bug needs-repro

All 12 comments

@viktor-anyvan Could you provide a reproduction? 馃檹

Sorry not really, its in our big project and not happening on local just on the servers (same node version). Any idea what should I try, how to debug?

Ideally if you start with https://template.nuxtjs.org and then add in relevant code until you see the error, that would be brilliant.

If I had to guess, I would start by investigating adding 'vue' to your build.transpile array as we recently started transpiling vue/composition-api by default (to solve a different issue).

Seems its related to https://nuxtjs.org/docs/2.x/configuration-glossary/configuration-modern/ we are using --modern=server for the build.

@danielroe are you looking into this? Any idea?

@viktor-anyvan I could really do with more info and a reproduction in order to look into this properly. What makes you think that it's related to modern: 'server'? Can you reproduce locally when you build/start the project? Are you relying on other libraries that also use the @vue/composition-api? (In which case, try adding them to your build.transpile as well to see if that fixes the issue - note that I've created issue #429 to track the issue.)

Was not able to reproduce locally just on the servers, by removing --modern=server was fine or when I moved back to v0.21.0
Don't see any other libraries using @vue/composition-api by looking the yarn.lock file.

@viktor-anyvan Would you be able to try with v0.23.0 to see if this fixes the issue for you?

@danielroe thank you for the update, will check it soon.

@viktor-anyvan Any updates?

@danielroe all good now, thank you!

@viktor-anyvan Delighted to hear it :blush:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Quineone picture Quineone  路  4Comments

namadnuno picture namadnuno  路  4Comments

MartinMalinda picture MartinMalinda  路  4Comments

posva picture posva  路  3Comments

JoeyYoung1997 picture JoeyYoung1997  路  7Comments