Skip to content

BunInstallFailedError: Installation fails with "Unsupported syntax: Operators are not allowed in JSON" #3138

Closed

Description

@victorserrada

Hello,

I'm experiencing a persistent installation error when trying to run opencode on my Ubuntu system. The installation process fails while attempting to download plugins, and the log consistently shows a JSON syntax error.

I have attached the most recent log file below for your analysis.

INFO  2025-10-13T15:44:59 +71ms service=default version=0.15.0 args=[] opencode
INFO  2025-10-13T15:44:59 +1ms service=project directory=~ fromDirectory
INFO  2025-10-13T15:44:59 +7ms service=config path=/.config/opencode/config.json loading
INFO  2025-10-13T15:44:59 +0ms service=config path=
/.config/opencode/opencode.json loading
INFO  2025-10-13T15:44:59 +0ms service=config path=/.config/opencode/opencode.jsonc loading
INFO  2025-10-13T15:44:59 +1ms service=bun cmd=["
/.opencode/bin/opencode","add","@opencode-ai/plugin@0.15.0","--exact"] cwd=/.config/opencode running
INFO  2025-10-13T15:44:59 +2ms service=bun cmd=["
/.opencode/bin/opencode","add","@opencode-ai/plugin@0.15.0","--exact"] cwd=/.opencode running
INFO  2025-10-13T15:44:59 +0ms service=plugin path=opencode-copilot-auth@0.0.3 loading plugin
INFO  2025-10-13T15:44:59 +0ms service=bun pkg=opencode-copilot-auth version=0.0.3 installing package using Bun's default registry resolution
INFO  2025-10-13T15:44:59 +0ms service=bun cmd=["
/.opencode/bin/opencode","add","--force","--exact","--cwd","/.cache/opencode","opencode-copilot-auth@0.0.3"] cwd=/.cache/opencode running
INFO  2025-10-13T15:45:00 +371ms service=bun code=1 stdout=bun add v1.3.0 (b0a6feca)
 stderr=Resolving dependencies
1 |
    ^
error: Unsupported syntax: Operators are not allowed in JSON
    at opencode-copilot-auth:1:1
Resolved, downloaded and extracted [2]
error: PackageFailedToParse parsing package manifest for opencode-copilot-auth
error: opencode-copilot-auth@0.0.3 failed to resolve
 done
ERROR 2025-10-13T15:45:00 +13ms service=default pkg=opencode-copilot-auth version=0.0.3 name=BunInstallFailedError message=BunInstallFailedError cause=Error: Command failed with exit code 1 stack=BunInstallFailedError: BunInstallFailedError
    at (/$bunfs/root/index.js:61801:43)
    at processTicksAndRejections (native:7:39) fatal
INFO  2025-10-13T15:45:00 +10ms service=bun code=1 stdout=bun add v1.3.0 (b0a6feca)
 stderr=Resolving dependencies
1 |
    ^
error: Unsupported syntax: Operators are not allowed in JSON
    at @opencode-ai/plugin:1:1
Resolved, downloaded and extracted [2]
error: PackageFailedToParse parsing package manifest for @opencode-ai/plugin
error: @opencode-ai/plugin@0.15.0 failed to resolve
 done
INFO  2025-10-13T15:45:00 +0ms service=bun code=1 stdout=bun add v1.3.0 (b0a6feca)
 stderr=Resolving dependencies
1 |
    ^
error: Unsupported syntax: Operators are not allowed in JSON
    at @opencode-ai/plugin:1:1
Resolved, downloaded and extracted [2]
error: PackageFailedToParse parsing package manifest for @opencode-ai/plugin
error: @opencode-ai/plugin@0.15.0 failed to resolve
 done
ERROR 2025-10-13T15:45:00 +0ms service=default e=Command failed with exit code 1 rejection
ERROR 2025-10-13T15:45:00 +0ms service=default e=Command failed with exit code 1 rejection

Any assistance in resolving this issue would be greatly appreciated.

Activity

  1. github-actions commented on Oct 13, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    The common pattern across these issues is failure to properly install or load the opencode-copilot-auth plugin during OpenCode initialization. Your specific error shows JSON parsing issues when Bun tries to resolve the plugin dependency, which suggests a registry or network connectivity problem.

    Feel free to ignore if none of these address your specific case.

  2. victorserrada commented on Oct 15, 2025

    @victorserrada
    Author

    ~ cat /etc/os-release
    PRETTY_NAME="Ubuntu 22.04.5 LTS"
    NAME="Ubuntu"
    VERSION_ID="22.04"
    VERSION="22.04.5 LTS (Jammy Jellyfish)"
    VERSION_CODENAME=jammy
    ID=ubuntu
    ID_LIKE=debian
    HOME_URL="https://www.ubuntu.com/"
    SUPPORT_URL="https://help.ubuntu.com/"
    BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
    PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
    UBUNTU_CODENAME=jammy

  3. rekram1-node commented on Oct 15, 2025

    @rekram1-node
    Contributor

    thanks for the details, ill take a look

  4. rekram1-node commented on Oct 18, 2025

    @rekram1-node
    Contributor

    @victorserrada can you try rm -rf ~/.cache/opencode and then try again?

  5. victorserrada commented on Oct 20, 2025

    @victorserrada
    Author

    Hi!
    Same issue:
    ➜ ~ rm -rf ~/.cache/opencode
    ➜ ~ opencode
    Error: Unexpected error, check log file at /home/victorgarcia/.local/share/opencode/log/2025-10-20T055729.log for more details

    ➜  ~ cat /home/victorgarcia/.local/share/opencode/log/2025-10-20T055729.log
    INFO  2025-10-20T05:57:29 +78ms service=default version=0.15.2 args=[] opencode
    INFO  2025-10-20T05:57:29 +1ms service=project directory=/home/victorgarcia fromDirectory
    INFO  2025-10-20T05:57:29 +9ms service=config path=/home/victorgarcia/.config/opencode/config.json loading
    INFO  2025-10-20T05:57:29 +0ms service=config path=/home/victorgarcia/.config/opencode/opencode.json loading
    INFO  2025-10-20T05:57:29 +1ms service=config path=/home/victorgarcia/.config/opencode/opencode.jsonc loading
    INFO  2025-10-20T05:57:29 +2ms service=bun cmd=["/home/linuxbrew/.linuxbrew/Cellar/opencode/0.15.2/bin/opencode","add","@opencode-ai/plugin@0.15.2","--exact"] cwd=/home/victorgarcia/.config/opencode running
    INFO  2025-10-20T05:57:29 +2ms service=plugin path=opencode-copilot-auth@0.0.3 loading plugin
    INFO  2025-10-20T05:57:29 +0ms service=bun pkg=opencode-copilot-auth version=0.0.3 installing package using Bun's default registry resolution
    INFO  2025-10-20T05:57:29 +0ms service=bun cmd=["/home/linuxbrew/.linuxbrew/Cellar/opencode/0.15.2/bin/opencode","add","--force","--exact","--cwd","/home/victorgarcia/.cache/opencode","opencode-copilot-auth@0.0.3"] cwd=/home/victorgarcia/.cache/opencode running
    INFO  2025-10-20T05:57:30 +402ms service=bun code=1 stdout=bun add v1.3.0 (b0a6feca)
     stderr=Resolving dependencies
    1 | <!DOCTYPE html>
        ^
    error: Unsupported syntax: Operators are not allowed in JSON
        at opencode-copilot-auth:1:1
    Resolved, downloaded and extracted [2]
    error: PackageFailedToParse parsing package manifest for opencode-copilot-auth
    error: opencode-copilot-auth@0.0.3 failed to resolve
     done
    ERROR 2025-10-20T05:57:30 +3ms service=default pkg=opencode-copilot-auth version=0.0.3 name=BunInstallFailedError message=BunInstallFailedError cause=Error: Command failed with exit code 1 stack=BunInstallFailedError: BunInstallFailedError
        at <anonymous> (/$bunfs/root/index.js:61802:43)
        at processTicksAndRejections (native:7:39) fatal
    INFO  2025-10-20T05:57:30 +14ms service=bun code=1 stdout=bun add v1.3.0 (b0a6feca)
     stderr=Resolving dependencies
    1 | <!DOCTYPE html>
        ^
    error: Unsupported syntax: Operators are not allowed in JSON
        at @opencode-ai/plugin:1:1
    Resolved, downloaded and extracted [2]
    error: PackageFailedToParse parsing package manifest for @opencode-ai/plugin
    error: @opencode-ai/plugin@0.15.2 failed to resolve
     done
    ERROR 2025-10-20T05:57:30 +1ms service=default e=Command failed with exit code 1 rejection
    `
    

    Thanks!

  6. rekram1-node commented on Oct 20, 2025

    @rekram1-node
    Contributor

    @victorserrada do you have some sort of proxy setup?

    <!DOCTYPE html>

    Looks like there could be some sort of error that is being encountered by install

    What happens if you do:

    cd ~/.cache/opencode
    cat package.json # if empty try: `BUN_BE_BUN=1 opencode install opencode-copilot-auth@0.0.3`
    BUN_BE_BUN=1 opencode install
    BUN_BE_BUN=1 opencode pm ls
  7. thdxr commented on Mar 25, 2026

    @thdxr
    Member

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

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 working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions