ERROR Cannot find module 'unplugin-vue-components/vite'
jag2kn opened this issue · comments
I created a new project in nuxt 3
npx nuxi@latest init testproject
cd testproject
Add a nuxt.config extends:
cat nuxt.config.ts
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: true },
extends: 'github:viandwi24/nuxt3-awesome-starter'
})
And install dependencies and get this error
pnpm install
Lockfile is up to date, resolution step is skipped
Already up to date
> nuxt-app@ postinstall /testproject
> nuxt prepare
Nuxi 3.6.2
ERROR Cannot find module 'unplugin-vue-components/vite' 6:01:33 p. m.
Require stack:
- /home/jag2kn/.cache/c12/github_viandwi24_nuxt3-awesome-starter/nuxt.config.ts
Require stack:
- /home/jag2kn/.cache/c12/github_viandwi24_nuxt3-awesome-starter/nuxt.config.ts
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.resolve (node:internal/modules/cjs/helpers:108:19)
at _resolve (node_modules/.pnpm/jiti@1.19.1/node_modules/jiti/dist/jiti.js:1:250100)
at jiti (node_modules/.pnpm/jiti@1.19.1/node_modules/jiti/dist/jiti.js:1:252409)
at /home/jag2kn/.cache/c12/github_viandwi24_nuxt3-awesome-starter/nuxt.config.ts:1:198
at evalModule (node_modules/.pnpm/jiti@1.19.1/node_modules/jiti/dist/jiti.js:1:255106)
at Object.jiti (node_modules/.pnpm/jiti@1.19.1/node_modules/jiti/dist/jiti.js:1:253034)
at resolveConfig (node_modules/.pnpm/c12@1.4.2/node_modules/c12/dist/index.mjs:280:24)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async extendConfig (node_modules/.pnpm/c12@1.4.2/node_modules/c12/dist/index.mjs:217:21)
after I dive deeper into the nuxt layer, I think using extensions against repos still has some issues, so I
so I suggest to use npm package as extends in your configuration :
# nuxt.config.ts
export default defineNuxtConfig({
devtools: { enabled: true },
extends: [
'@nuxt-awesome/theme',
]
})
I've updated the readme so you and others can follow this path too.