Closed florealcab closed 1 year ago
have you run the program using "pnpm dev"?
have you run the program using "pnpm dev"?
I didn't, so I run in console then the bug disapears :o
But why? I have another project I installed with yarn and "yarn dev" did not fix that bug. Do you add something in this app cause pnpm dev fix the issue, or it's just pnpm?
Oh ah no, if I do yarn dev, then reopen vscode it works again... seems to be a nuxt strange issue so I can close
as I wrote in the readme,
this project was created using pnpm, because pnpm has a different working concept than yarn and npm so it might cause problems if not using pnpm in projects that use pnpm.
and this is actually a type problem.
nuxt typescript of course uses the types definition, and it will only be generated when you have run the program using "pnpm dev" because of our need for development.
the dev command will run nuxt and automatically generate types in the ".nuxt" folder.
if this folder does not exist, then this project will certainly display error problems, namely types are not defined in various functions.
or you can use "npx nuxi prepare" for only generate types.
On pages inside a subfolder of pages folder (example: pages/post/index.vue) I have a bug with VScode: it says composables functions are not defined, and an error with the import, see the image below:
Do you have the same problem? It's a problem I have with my project too, and I didn't find a fix :/