Diizzayy / nuxt-graphql-client

⚡️ Minimal GraphQL Client + Code Generation for Nuxt3
https://nuxt-graphql-client.web.app
MIT License
366 stars 44 forks source link

Cannot find name 'useAsyncGql'.ts in stable release #253

Closed pzpsofficial closed 2 years ago

pzpsofficial commented 2 years ago

Environment


Describe the bug

I have just upgraded nuxt to latest stable release, and I get the following error:

Cannot find name 'useAsyncGql'.

Is it a known issue or something?

Expected behaviour

Being able to use useAsyncGql in vue files.

Reproduction

No response

Additional context

No response

Logs

No response

Diizzayy commented 2 years ago

@pzpsofficial try running npx nuxi clean and deleting your lockfile (package-lock.json) then re-installing the dependencies.

pzpsofficial commented 2 years ago

@Diizzayy Thanks! It worked like a charm, but now I am getting another error: Unexpected token '??=' - but I guess that it's something related to Nuxt itself, what do you think?

Diizzayy commented 2 years ago

@pzpsofficial the The nullish coalescing assignment operator (??=) is used across nuxt and was introduced in node v15^, you'll have to update from version v14.18.3

pzpsofficial commented 2 years ago

@Diizzayy Oooh, so that's what makes a great developer great :D Thank you so much, it's working like a charm. Thanks again, and all best!

Diizzayy commented 2 years ago

@pzpsofficial Happy to help!