Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR Cannot find module 'unplugin-vue-components/vite' #66

Open
jag2kn opened this issue Jul 7, 2023 · 1 comment
Open

ERROR Cannot find module 'unplugin-vue-components/vite' #66

jag2kn opened this issue Jul 7, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@jag2kn
Copy link

jag2kn commented Jul 7, 2023

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)
@viandwi24 viandwi24 added the bug Something isn't working label Jul 8, 2023
@viandwi24 viandwi24 self-assigned this Jul 8, 2023
@viandwi24
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants