create icon indicating copy to clipboard operation
create copied to clipboard

yarn: create template missing dependency

Open Yekt opened this issue 9 months ago • 0 comments

When creating a new vuetify project using yarn (4.2.2), the created project might have missing dependencies and can't be started.

Steps to reproduce

  • yarn create vuetify
    • Preset: Essentials (Base, Layouts, Pinia)
    • Use TypeScript: No
    • Package manager: yarn
    • Install Dependencies: Yes
  • cd into the created project
  • yarn dev
  • Error: unplugin-vue-router tried to access @vue/compiler-sfc, but it isn't declared in its dependencies;
Stacktrace
failed to load config from C:\Users\<u>\Documents\git\vuetify3\vite.config.mjs
error when starting dev server:
Error: unplugin-vue-router tried to access @vue/compiler-sfc, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Required package: @vue/compiler-sfc (via "@vue\compiler-sfc\package.json")
Required by: unplugin-vue-router@virtual:8fa23003b625c9f1c0bfafebc7d98e5483e90f8881ab8ca19bedf1bf38c3f7f50ffde76e543b72e647f6f216452bbf9e9c74b182f07a1e63fbe895e6aab64e90#npm:0.8.6 (via C:\Users\<u>\Documents\git\vuetify3\.yarn\__virtual__\unplugin-vue-router-virtual-28baf8bdfb\4\AppData\Local\Yarn\Berry\cache\unplugin-vue-router-npm-0.8.6-4f36a46575-10c0.zip\node_modules\unplugin-vue-router\dist\chunk-UGN5YR6V.mjs)

at makeError (C:\Users\<u>\Documents\git\vuetify3\.pnp.cjs:10381:34)
at resolveToUnqualified (C:\Users\<u>\Documents\git\vuetify3\.pnp.cjs:12029:21)
at Object.resolveToUnqualified (C:\Users\<u>\Documents\git\vuetify3\.pnp.cjs:12209:26)
at resolve$1 (file:///C:/Users/<u>/Documents/git/vuetify3/.pnp.loader.mjs:2027:31)
at nextResolve (node:internal/modules/esm/hooks:866:28)
at Hooks.resolve (node:internal/modules/esm/hooks:304:30)
at handleMessage (node:internal/modules/esm/worker:196:24)
at Immediate.checkForMessages (node:internal/modules/esm/worker:138:28)
at process.processImmediate (node:internal/timers:478:21)

Temporary workarround

Running yarn add --dev @vue/compiler-sfc fixes the issue.
However it would be nice if the template would just work out of the box.

Yekt avatar May 18 '24 20:05 Yekt