Skip to content

Failed to resolve import "@vue/apollo-composable" #444

@Der-Alex

Description

@Der-Alex

I created an app with nuxtjs v3 rc-13 and @nuxtjs/[email protected] based on a pre defined project that I created with nuxt 3 rc-11.
After I installed my dependencies and started npm run dev I got the error, thta @vue/apollo-composable module is missing. That was because I forgot to remove import statements from my old project. After I removed them and cleared the nuxi cache I restarted the app and still got the error [plugin:vite:import-analysis] Failed to resolve import "@vue/apollo-composable" from "pages/[...pages].vue". Does the file exist?
I double checked that there is no import on my side. I guess that using useQuery with the nuxt configuration apollo: { autoImports: true } doesn't work correctly. I Checked the dependencies of the @nuxtjs/[email protected] module and saw, that it uses @vue/apollo-composable internally, which is present in the modules node_module folder.

After I installed the package @vue/apollo-composable as my dependency, everything seems to work. But I think that's the wrong way. Could you please check this behaviour?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions