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

pull/21036/head
Dax 2026-04-04 16:27:20 -04:00 committed by GitHub
parent c08fa5675f
commit 629e866ff0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View File

@ -209,6 +209,7 @@ for (const item of targets) {
conditions: ["browser"],
tsconfig: "./tsconfig.json",
plugins: [plugin],
external: ["node-gyp"],
compile: {
autoloadBunfig: false,
autoloadDotenv: false,

View File

@ -67,6 +67,7 @@ export namespace Npm {
binLinks: true,
progress: false,
savePrefix: "",
ignoreScripts: true,
})
const tree = await arborist.loadVirtual().catch(() => {})
if (tree) {
@ -106,6 +107,7 @@ export namespace Npm {
binLinks: true,
progress: false,
savePrefix: "",
ignoreScripts: true,
})
await arb.reify().catch(() => {})
}