Skip to content

Commit 629e866

Browse files
authored
fix(npm): Arborist reify fails on compiled binary — Bun pre-resolves node-gyp path at build time (anomalyco#21040)
1 parent c08fa56 commit 629e866

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

packages/opencode/script/build.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ for (const item of targets) {
209209
conditions: ["browser"],
210210
tsconfig: "./tsconfig.json",
211211
plugins: [plugin],
212+
external: ["node-gyp"],
212213
compile: {
213214
autoloadBunfig: false,
214215
autoloadDotenv: false,

packages/opencode/src/npm/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export namespace Npm {
6767
binLinks: true,
6868
progress: false,
6969
savePrefix: "",
70+
ignoreScripts: true,
7071
})
7172
const tree = await arborist.loadVirtual().catch(() => {})
7273
if (tree) {
@@ -106,6 +107,7 @@ export namespace Npm {
106107
binLinks: true,
107108
progress: false,
108109
savePrefix: "",
110+
ignoreScripts: true,
109111
})
110112
await arb.reify().catch(() => {})
111113
}

0 commit comments

Comments
 (0)