Fresh vue project fails with yarn dev due to missing undeclared dependency #15090
|
When I create a minimal fresh vue project with yarn 4.14.1 resp. 4.17.1 I get the following error, when I run When I add What am I doing wrong, or is this a bug? The only thing I found about it is: https://blog.path-finder.jp/troubleshooting/vite-8-rolldown-resolve-plugin-troubleshooting-202/
but is there some way to do it for all of the peer dependencies at once? Is this the right way? This is my log output: |
Replies: 2 comments
|
You should not need to add The practical workaround is to run this scaffold with the node-modules linker for now: yarn config set nodeLinker node-modules
rm -f .pnp.cjs .pnp.loader.mjs
rm -rf node_modules .yarn/cache
yarn install
yarn devIf you want to stay on PnP, use |
|
You can seek help from the Vite community |
You should not need to add
rolldown,picomatch, etc. to the app one by one. Invite@8.1.4those are dependencies of Vite itself, so this looks like a Yarn PnP resolution/compatibility issue rather than missing peer dependencies in your Vue app.The practical workaround is to run this scaffold with the node-modules linker for now:
yarn config set nodeLinker node-modules rm -f .pnp.cjs .pnp.loader.mjs rm -rf node_modules .yarn/cache yarn install yarn devIf you want to stay on PnP, use
packageExtensionsfor the package Yarn reports as making the undeclared access, but manually installing every missing transitive dependency is the wrong direction.