From 3d8892ef23a5d5a9bc3f98e8fa45d22ae23b89e8 Mon Sep 17 00:00:00 2001 From: "charelle.sandig" Date: Tue, 28 Mar 2023 12:55:18 +0800 Subject: [PATCH] build(yarn): migrate to CorePack Signed-off-by: charelle.sandig --- BUILD.md | 6 ++++++ package.json | 1 + 2 files changed, 7 insertions(+) diff --git a/BUILD.md b/BUILD.md index a784830b530..53362e61656 100644 --- a/BUILD.md +++ b/BUILD.md @@ -129,6 +129,12 @@ git config --system core.longpaths true cd cactus ``` +* Run this command to enable corepack (Corepack is included by default with all Node.js installs, but is currently opt-in.) + +```sh +npm run enable-corepack +``` + * Run the initial configuration script (can take a long time, 10+ minutes on a low-spec laptop) ```sh diff --git a/package.json b/package.json index 5495912a635..088b85e6eca 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "reset": "run-s reset:git reset:node-modules reset:yarn-lock configure", "configure": "yarn run init-registries && yarn install --frozen-lockfile --non-interactive && yarn run build:dev:backend", "install-yarn": "npm install --global yarn@1.22.17", + "enable-corepack": "npm i -g corepack && corepack enable && corepack prepare yarn@1.22.17 --activate", "custom-checks": "TS_NODE_PROJECT=./tools/tsconfig.json node --trace-deprecation --experimental-modules --abort-on-uncaught-exception --loader ts-node/esm --experimental-specifier-resolution=node ./tools/custom-checks/run-custom-checks.ts", "tools:validate-bundle-names": "TS_NODE_PROJECT=./tools/tsconfig.json node --trace-deprecation --experimental-modules --abort-on-uncaught-exception --loader ts-node/esm --experimental-specifier-resolution=node ./tools/validate-bundle-names.js", "generate-api-server-config": "node ./tools/generate-api-server-config.js",