Vuetify preset Essentials cannot find module 'virtual:generated-layouts'

165 views Asked by At

I'm starting a Vuetify project with Vue3 and want to build it. Npm run dev is working fine but npm run build failed on this error : error message

Thanks in advance for the help.

I found out with some tests that the blank project from Vuetify works for 2 presets out of 3 (Default and Base) but doesn't work for the preset Essentials because of the error I'm facing.

1

There are 1 answers

1
Yue JIN On

It seems that you are using vite-plugin-vue-layouts. This is a Typescript error. You need to add types of virtual module in your project to pass typecheck:

// tsconfig.json
{
  "compilerOptions": {
    // ...
    "types": ['vite-plugin-vue-layouts/client'],
  },
}

Ref: https://github.com/JohnCampionJr/vite-plugin-vue-layouts?tab=readme-ov-file#client-types