[BUG]: Integrity check failed for tarball: opencode-darwin-arm64 #2651

Closed
opened 2026-02-16 17:36:37 -05:00 by yindo · 1 comment
Owner

Originally created by @istarkov on GitHub (Nov 6, 2025).

Originally assigned to: @thdxr on GitHub.

Description

Starting from 1.0.36 I'm getting on bun add -g opencode-ai@1.0.36 the following error Integrity check failed for tarball

  🚚 opencode-darwin-arm64 [2/2] error: Integrity check failed for tarball: opencode-darwin-arm64
error: IntegrityCheckFailed extracting tarball from opencode-darwin-arm64

1.0.35 is ok

OpenCode version

1.0.36

Steps to reproduce

# run any of on mac m{x}
bun add -g opencode-ai@1.0.36
bun add -g opencode-ai

Screenshot and/or share link

No response

Operating System

macOs 26.0.1 (MacBook Air m4)

Terminal

iterm2

Trying to build from dev branch is not working too

This fails with
https://github.com/sst/opencode/blob/09bb8190640dabd12908b77e2f6a0390fb7fafd6/packages/opencode/script/build.ts#L47

tar: ../../node_modules/opentui-core-win32-x64-0.1.36.tgz: Not found in archive
tar: ../../node_modules/opentui-core-win32-x64-0.0.0-20251106-788e97e4.tgz: Not found in archive
tar: -C: Not found in archive
tar: ../../node_modules/@opentui/core-win32-x64: Not found in archive
tar: --strip-components=1: Not found in archive
tar: Error exit delayed from previous errors.
43 |   await $`mkdir -p ../../node_modules/${opentui}`
44 |   await $`npm pack ${opentui}@${pkg.dependencies["@opentui/core"]}`.cwd(
45 |     path.join(dir, "../../node_modules"),
46 |   )
47 |   console.log(1)
48 |   await $`tar -xf ../../node_modules/${opentui.replace("@opentui/", "opentui-")}-*.tgz -C ../../node_modules/${opentui} --strip-components=1`
                    ^
ShellError: Failed with exit code 1
 exitCode: 1,
   stdout: "",
   stderr: "tar: ../../node_modules/opentui-core-win32-x64-0.1.36.tgz: Not found in archive\ntar: ../../node_modules/opentui-core-win32-x64-0.0.0-20251106-788e97e4.tgz: Not found in archive\ntar: -C: Not found in archive\ntar: ../../node_modules/@opentui/core-win32-x64: Not found in archive\ntar: --strip-components=1: Not found in archive\ntar: Error exit delayed from previous errors.\n",

      at new ShellPromise (75:16)
      at BunShell (191:35)
      at /Users/ice/oss-prs/opencode/packages/opencode/script/build.ts:48:9
Originally created by @istarkov on GitHub (Nov 6, 2025). Originally assigned to: @thdxr on GitHub. ### Description Starting from 1.0.36 I'm getting on `bun add -g opencode-ai@1.0.36` the following error `Integrity check failed for tarball` ```log 🚚 opencode-darwin-arm64 [2/2] error: Integrity check failed for tarball: opencode-darwin-arm64 error: IntegrityCheckFailed extracting tarball from opencode-darwin-arm64 ``` 1.0.35 is ok ### OpenCode version 1.0.36 ### Steps to reproduce ```bash # run any of on mac m{x} bun add -g opencode-ai@1.0.36 bun add -g opencode-ai ``` ### Screenshot and/or share link _No response_ ### Operating System macOs 26.0.1 (MacBook Air m4) ### Terminal iterm2 Trying to build from dev branch is not working too This fails with https://github.com/sst/opencode/blob/09bb8190640dabd12908b77e2f6a0390fb7fafd6/packages/opencode/script/build.ts#L47 ```log tar: ../../node_modules/opentui-core-win32-x64-0.1.36.tgz: Not found in archive tar: ../../node_modules/opentui-core-win32-x64-0.0.0-20251106-788e97e4.tgz: Not found in archive tar: -C: Not found in archive tar: ../../node_modules/@opentui/core-win32-x64: Not found in archive tar: --strip-components=1: Not found in archive tar: Error exit delayed from previous errors. 43 | await $`mkdir -p ../../node_modules/${opentui}` 44 | await $`npm pack ${opentui}@${pkg.dependencies["@opentui/core"]}`.cwd( 45 | path.join(dir, "../../node_modules"), 46 | ) 47 | console.log(1) 48 | await $`tar -xf ../../node_modules/${opentui.replace("@opentui/", "opentui-")}-*.tgz -C ../../node_modules/${opentui} --strip-components=1` ^ ShellError: Failed with exit code 1 exitCode: 1, stdout: "", stderr: "tar: ../../node_modules/opentui-core-win32-x64-0.1.36.tgz: Not found in archive\ntar: ../../node_modules/opentui-core-win32-x64-0.0.0-20251106-788e97e4.tgz: Not found in archive\ntar: -C: Not found in archive\ntar: ../../node_modules/@opentui/core-win32-x64: Not found in archive\ntar: --strip-components=1: Not found in archive\ntar: Error exit delayed from previous errors.\n", at new ShellPromise (75:16) at BunShell (191:35) at /Users/ice/oss-prs/opencode/packages/opencode/script/build.ts:48:9 ```
yindo added the opentuibug labels 2026-02-16 17:36:37 -05:00
yindo closed this issue 2026-02-16 17:36:37 -05:00
Author
Owner

@Ravi-AIML commented on GitHub (Nov 6, 2025):

Description

Starting from 1.0.36 I'm getting on bun add -g opencode-ai@1.0.36 the following error Integrity check failed for tarball

  🚚 opencode-darwin-arm64 [2/2] error: Integrity check failed for tarball: opencode-darwin-arm64
error: IntegrityCheckFailed extracting tarball from opencode-darwin-arm64

1.0.35 is ok

OpenCode version

1.0.36

Steps to reproduce

run any of on mac m{x}

bun add -g opencode-ai@1.0.36
bun add -g opencode-ai

Screenshot and/or share link

No response

Operating System

macOs 26.0.1 (MacBook Air m4)

Terminal

iterm2

Trying to build from dev branch is not working too

This fails with

opencode/packages/opencode/script/build.ts

Line 47 in 09bb819

await $tar -xf ../../node_modules/${opentui.replace("@opentui/", "opentui-")}-*.tgz -C ../../node_modules/${opentui} --strip-components=1

tar: ../../node_modules/opentui-core-win32-x64-0.1.36.tgz: Not found in archive
tar: ../../node_modules/opentui-core-win32-x64-0.0.0-20251106-788e97e4.tgz: Not found in archive
tar: -C: Not found in archive
tar: ../../node_modules/@opentui/core-win32-x64: Not found in archive
tar: --strip-components=1: Not found in archive
tar: Error exit delayed from previous errors.
43 |   await $`mkdir -p ../../node_modules/${opentui}`
44 |   await $`npm pack ${opentui}@${pkg.dependencies["@opentui/core"]}`.cwd(
45 |     path.join(dir, "../../node_modules"),
46 |   )
47 |   console.log(1)
48 |   await $`tar -xf ../../node_modules/${opentui.replace("@opentui/", "opentui-")}-*.tgz -C ../../node_modules/${opentui} --strip-components=1`
                    ^
ShellError: Failed with exit code 1
 exitCode: 1,
   stdout: "",
   stderr: "tar: ../../node_modules/opentui-core-win32-x64-0.1.36.tgz: Not found in archive\ntar: ../../node_modules/opentui-core-win32-x64-0.0.0-20251106-788e97e4.tgz: Not found in archive\ntar: -C: Not found in archive\ntar: ../../node_modules/@opentui/core-win32-x64: Not found in archive\ntar: --strip-components=1: Not found in archive\ntar: Error exit delayed from previous errors.\n",

      at new ShellPromise (75:16)
      at BunShell (191:35)
      at /Users/ice/oss-prs/opencode/packages/opencode/script/build.ts:48:9

The build fails with "Not found in archive" error because old tarball files from previous builds remain in node_modules, causing the wildcard pattern to match multiple files.

npm pack creates opentui-core-win32-x64-0.1.36.tgz but opentui-core-win32-x64-0.0.0-20251106-788e97e4.tgz still exists from before. The wildcard opentui-core-win32-x64-*.tgz matches both, confusing tar.

Delete old tarball files before building:

rm -f node_modules/opentui-core-*.tgz node_modules/parcel-watcher-*.tgz
@Ravi-AIML commented on GitHub (Nov 6, 2025): > ### Description > Starting from 1.0.36 I'm getting on `bun add -g opencode-ai@1.0.36` the following error `Integrity check failed for tarball` > > ``` > 🚚 opencode-darwin-arm64 [2/2] error: Integrity check failed for tarball: opencode-darwin-arm64 > error: IntegrityCheckFailed extracting tarball from opencode-darwin-arm64 > ``` > > 1.0.35 is ok > > ### OpenCode version > 1.0.36 > > ### Steps to reproduce > # run any of on mac m{x} > bun add -g opencode-ai@1.0.36 > bun add -g opencode-ai > ### Screenshot and/or share link > _No response_ > > ### Operating System > macOs 26.0.1 (MacBook Air m4) > > ### Terminal > iterm2 > > Trying to build from dev branch is not working too > > This fails with > > [opencode/packages/opencode/script/build.ts](https://github.com/sst/opencode/blob/09bb8190640dabd12908b77e2f6a0390fb7fafd6/packages/opencode/script/build.ts#L47) > > Line 47 in [09bb819](/sst/opencode/commit/09bb8190640dabd12908b77e2f6a0390fb7fafd6) > > await $`tar -xf ../../node_modules/${opentui.replace("@opentui/", "opentui-")}-*.tgz -C ../../node_modules/${opentui} --strip-components=1` > ``` > tar: ../../node_modules/opentui-core-win32-x64-0.1.36.tgz: Not found in archive > tar: ../../node_modules/opentui-core-win32-x64-0.0.0-20251106-788e97e4.tgz: Not found in archive > tar: -C: Not found in archive > tar: ../../node_modules/@opentui/core-win32-x64: Not found in archive > tar: --strip-components=1: Not found in archive > tar: Error exit delayed from previous errors. > 43 | await $`mkdir -p ../../node_modules/${opentui}` > 44 | await $`npm pack ${opentui}@${pkg.dependencies["@opentui/core"]}`.cwd( > 45 | path.join(dir, "../../node_modules"), > 46 | ) > 47 | console.log(1) > 48 | await $`tar -xf ../../node_modules/${opentui.replace("@opentui/", "opentui-")}-*.tgz -C ../../node_modules/${opentui} --strip-components=1` > ^ > ShellError: Failed with exit code 1 > exitCode: 1, > stdout: "", > stderr: "tar: ../../node_modules/opentui-core-win32-x64-0.1.36.tgz: Not found in archive\ntar: ../../node_modules/opentui-core-win32-x64-0.0.0-20251106-788e97e4.tgz: Not found in archive\ntar: -C: Not found in archive\ntar: ../../node_modules/@opentui/core-win32-x64: Not found in archive\ntar: --strip-components=1: Not found in archive\ntar: Error exit delayed from previous errors.\n", > > at new ShellPromise (75:16) > at BunShell (191:35) > at /Users/ice/oss-prs/opencode/packages/opencode/script/build.ts:48:9 > ``` The build fails with "Not found in archive" error because old tarball files from previous builds remain in node_modules, causing the wildcard pattern to match multiple files. npm pack creates `opentui-core-win32-x64-0.1.36.tgz` but `opentui-core-win32-x64-0.0.0-20251106-788e97e4.tgz` still exists from before. The wildcard `opentui-core-win32-x64-*.tgz` matches both, confusing tar. Delete old tarball files before building: ```bash rm -f node_modules/opentui-core-*.tgz node_modules/parcel-watcher-*.tgz
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2651