yarn create farm myapp --template vue3
cd myapp
yarn
yarn add --dev vite # See issue 1420
yarn start # Works
Upgrade to modern yarn version:
yarn set version stable
yarn
yarn start # Works
Use PnP node linker: modify the .yarnrc.yml file to change nodeLinker from node-modules to pnp. Or just delete the file.
yarn
yarn start # Fails
Error:
[ Farm ] Using config file at /private/tmp/myapp/farm.config.ts
[ Farm ] Failed to start the server:
Error: Failed to load farm config file: Can not resolve `/Users/foo/.yarn/berry/cache/@farmfe-runtime-npm-0.11.1-89f6526c45-10c0.zip/node_modules/@farmfe/runtime/src/index.ts.farm-runtime` from /private/tmp/myapp.
Original error: None.
Potential Causes:
1.The file that `/Users/foo/.yarn/berry/cache/@farmfe-runtime-npm-0.11.1-89f6526c45-10c0.zip/node_modules/@farmfe/runtime/src/index.ts.farm-runtime` points to does not exist.
2.Install it first if `/Users/foo/.yarn/berry/cache/@farmfe-runtime-npm-0.11.1-89f6526c45-10c0.zip/node_modules/@farmfe/runtime/src/index.ts.farm-runtime` is an dependency from node_modules, if you are using pnpm refer to [https://pnpm.io/faq#pnpm-does-not-work-with-your-project-here] for solutions.
3. If `/Users/foo/.yarn/berry/cache/@farmfe-runtime-npm-0.11.1-89f6526c45-10c0.zip/node_modules/@farmfe/runtime/src/index.ts.farm-runtime` is a alias, make sure your alias config is correct.
Error: ["Can not resolve `/Users/foo/.yarn/berry/cache/@farmfe-runtime-npm-0.11.1-89f6526c45-10c0.zip/node_modules/@farmfe/runtime/src/index.ts.farm-runtime` from /private/tmp/myapp.\nOriginal error: None.\n\nPotential Causes:\n1.The file that `/Users/foo/.yarn/berry/cache/@farmfe-runtime-npm-0.11.1-89f6526c45-10c0.zip/node_modules/@farmfe/runtime/src/index.ts.farm-runtime` points to does not exist.\n2.Install it first if `/Users/foo/.yarn/berry/cache/@farmfe-runtime-npm-0.11.1-89f6526c45-10c0.zip/node_modules/@farmfe/runtime/src/index.ts.farm-runtime` is an dependency from node_modules, if you are using pnpm refer to [https://pnpm.io/faq#pnpm-does-not-work-with-your-project-here] for solutions.\n3. If `/Users/foo/.yarn/berry/cache/@farmfe-runtime-npm-0.11.1-89f6526c45-10c0.zip/node_modules/@farmfe/runtime/src/index.ts.farm-runtime` is a alias, make sure your alias config is correct.\n"]
Reproduce link
No response
What is actually happening?
yarn start fails when the project is using yarn berry with PnP enabled.
Steps to reproduce
Create Vue 3 project:
Upgrade to modern yarn version:
Use PnP node linker: modify the
.yarnrc.yml
file to changenodeLinker
fromnode-modules
topnp
. Or just delete the file.Error:
Reproduce link
No response
What is actually happening?
yarn start
fails when the project is using yarn berry with PnP enabled.System Info