fix(npm): Arborist reify fails on compiled binary — Bun pre-resolves node-gyp path at build time (#21040)

This commit is contained in:
Dax
2026-04-04 16:27:20 -04:00
committed by GitHub
parent c08fa5675f
commit 629e866ff0
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -209,6 +209,7 @@ for (const item of targets) {
conditions: ["browser"], conditions: ["browser"],
tsconfig: "./tsconfig.json", tsconfig: "./tsconfig.json",
plugins: [plugin], plugins: [plugin],
external: ["node-gyp"],
compile: { compile: {
autoloadBunfig: false, autoloadBunfig: false,
autoloadDotenv: false, autoloadDotenv: false,
+2
View File
@@ -67,6 +67,7 @@ export namespace Npm {
binLinks: true, binLinks: true,
progress: false, progress: false,
savePrefix: "", savePrefix: "",
ignoreScripts: true,
}) })
const tree = await arborist.loadVirtual().catch(() => {}) const tree = await arborist.loadVirtual().catch(() => {})
if (tree) { if (tree) {
@@ -106,6 +107,7 @@ export namespace Npm {
binLinks: true, binLinks: true,
progress: false, progress: false,
savePrefix: "", savePrefix: "",
ignoreScripts: true,
}) })
await arb.reify().catch(() => {}) await arb.reify().catch(() => {})
} }