From 0be9559c1ee24fb25bc99c5a1a480829fbe554cd Mon Sep 17 00:00:00 2001 From: Neko Ayaka Date: Wed, 26 Nov 2025 00:02:54 +0800 Subject: [PATCH] =?UTF-8?q?fix(ci):=20ERR=5FPNPM=5FADDING=5FTO=5FROOT?= =?UTF-8?q?=E2=80=89for=20wrangler?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-cloudflare-pages.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/deploy-cloudflare-pages.yml b/.github/workflows/deploy-cloudflare-pages.yml index 5402e3955..7bf6f2e47 100644 --- a/.github/workflows/deploy-cloudflare-pages.yml +++ b/.github/workflows/deploy-cloudflare-pages.yml @@ -54,6 +54,20 @@ jobs: with: node-version: lts/* cache: pnpm + # NOTICE: + # + # Here installing wrangler to global is required, or otherwise: + # ERR_PNPM_ADDING_TO_ROOT  Running this command will add the dependency to the workspace root... + # error occurs. + # + # Since https://github.com/cloudflare/wrangler-action/pull/339#issuecomment-2667622947 rejected the -g support + # by saying un-reasonable 'I'm not sure if it's common ... to install packages to the global scope, ... might be introducing some unintended side effects.' + # + # Clearly I think installing with ` install` brings more unintended side effects... + # + # As suggested by https://github.com/cloudflare/wrangler-action/issues/181#issuecomment-2127990708, we should pre-install + # with our package manager and then use it in the action. + - run: pnpm i -g wrangler@4 - run: pnpm install --frozen-lockfile - run: pnpm run build:packages - run: ${{ matrix.command }}