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

Open
opened 2026-02-16 17:34:02 -05:00 by yindo · 6 comments
Owner

Originally created by @victorserrada on GitHub (Oct 13, 2025).

Originally assigned to: @thdxr on GitHub.

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.

Originally created by @victorserrada on GitHub (Oct 13, 2025). Originally assigned to: @thdxr on GitHub. 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 | <!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-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 <anonymous> (/$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 | <!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.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 | <!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.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.
yindo added the bug label 2026-02-16 17:34:02 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 13, 2025):

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

  • #2992: Similar BunInstallFailedError during plugin installation on Windows, also encounters registry resolution problems and TLS/CA certificate issues
  • #3082: Program stuck on initialization while trying to install opencode-copilot-auth plugin, same hanging behavior during plugin installation
  • #2341: Error loading opencode-copilot-auth plugin, similar plugin installation failures

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.

@github-actions[bot] commented on GitHub (Oct 13, 2025): This issue might be a duplicate of existing issues. Please check: - #2992: Similar BunInstallFailedError during plugin installation on Windows, also encounters registry resolution problems and TLS/CA certificate issues - #3082: Program stuck on initialization while trying to install opencode-copilot-auth plugin, same hanging behavior during plugin installation - #2341: Error loading opencode-copilot-auth plugin, similar plugin installation failures 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.
Author
Owner

@victorserrada commented on GitHub (Oct 15, 2025):

~ 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

@victorserrada commented on GitHub (Oct 15, 2025): ~ 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
Author
Owner

@rekram1-node commented on GitHub (Oct 15, 2025):

thanks for the details, ill take a look

@rekram1-node commented on GitHub (Oct 15, 2025): thanks for the details, ill take a look
Author
Owner

@rekram1-node commented on GitHub (Oct 18, 2025):

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

@rekram1-node commented on GitHub (Oct 18, 2025): @victorserrada can you try `rm -rf ~/.cache/opencode` and then try again?
Author
Owner

@victorserrada commented on GitHub (Oct 20, 2025):

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!

@victorserrada commented on GitHub (Oct 20, 2025): 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!
Author
Owner

@rekram1-node commented on GitHub (Oct 20, 2025):

@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
@rekram1-node commented on GitHub (Oct 20, 2025): @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: ```zsh 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 ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2075