From 9f4760b5a26676708074b608737bdffd61bc0cec Mon Sep 17 00:00:00 2001 From: ouliuquan Date: Fri, 2 Sep 2022 13:50:02 +0800 Subject: [PATCH] docs: declare node-linker when using Yarn 3 Because of yarn 3 use PnP by default, but electron-builder still need node-modules. So add configuration in the `.yarnrc.yaml`: ``` nodeLinker: "node-modules" ``` will declare to use node-modules instead of PnP. --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 894785f7d7..6d0d261975 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,14 @@ public-hoist-pattern=* shamefully-hoist=true ``` +### Note for Yarn 3 + +Yarn 3 use PnP by default, but electron-builder still need node-modules(ref: [yarnpkg/berry#4804](https://github.com/yarnpkg/berry/issues/4804#issuecomment-1234407305)). Add configuration in the `.yarnrc.yaml` as follows: +``` +nodeLinker: "node-modules" +``` +will declare to use node-modules instead of PnP. + ## Quick Setup Guide [electron-webpack-quick-start](https://github.com/electron-userland/electron-webpack-quick-start) is a recommended way to create a new Electron application. See [Boilerplates](https://www.electron.build/#boilerplates).