From f8d6189e9d4edb66f6685d36af44283a746301a9 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Fri, 13 Oct 2023 14:15:35 +0800 Subject: [PATCH] Fix npm install command --- utils.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utils.ts b/utils.ts index 90a81b5..6d6122a 100644 --- a/utils.ts +++ b/utils.ts @@ -450,8 +450,9 @@ export async function applyPackageOverrides( } else if (pm === "yarn") { await $`yarn install`; } else if (pm === "npm") { - // TOOD(kdy1): This is required just for https://github.com/SukkaW/rollup-plugin-swc - await $`npm install --legacy-peer-deps`; + // The transitive dependencies of the linked dependencies will not be installed by `npm i` unless `--install-links` is specified. + // See https://github.com/npm/cli/issues/2339#issuecomment-1111228605 + await $`npm install --install-links`; } }