Open thibaultchazal opened 1 year ago
I had the same issue, and solved it by deleting the node_modules folder and then running npm install
.
so if deleteing node_modules does NOT work is my only option to use fetch api?
You can solve this by adding @nuxtjs/apollo
to the modules in nuxt.config.ts
and afterwards running npx nuxt prepare
to generate the types.
The types for nuxt modules must be generated, see:
The default minimal nuxt starter kit adds a postInstall
script to package.json
to run this automatically after npm install
:
"scripts": {
"postinstall": "nuxt prepare"
}
Is this a Nuxt problem or a Nuxt Apollo problem? Should @nuxtjs/apollo
run nuxt prepare
in postinstall?
Environment
Darwin
v16.18.1
3.2.3
2.2.3
npm@8.19.2
vite
typescript
,modules
,apollo
@nuxt/typescript-build@2.1.0
,@nuxtjs/apollo@5.0.0-alpha.5
-
Describe the bug
I have this error in VSCode:
My nuxt.config.ts look like that