Skip to content

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

Closed

Description

@istarkov

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

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 7, 2025
  2. Ravi-AIML commented on Nov 7, 2025

    @Ravi-AIML

    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
  3. self-assigned this
    on Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions