anomalyco / anomalyco/opencode

webfetch tool fails: `Cannot find module '../data/patch.json' from ''`

Open
#40,350 0 comments 0 reactions 1 assignee View on GitHub

@nexxeln is already working on this.

Since Aug 4, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Bug

The webfetch tool fails immediately on every URL with:

Cannot find module '../data/patch.json' from ''

Appears to be a missing/inaccessible data file in the bundled webfetch
tool, not transient runtime state. Restart does not fix it.

Environment

  • opencode version: 1.18.12 (latest)
  • install method: standalone binary at ~/.opencode/bin/opencode (179 MB ELF)
  • OS: Fedora Silverblue 44 (linux x86_64)
  • Date: 2026-08-03

Reproduction

Any URL passed to webfetch reproduces. Example:

url: https://example.com

Result: error above.

Diagnosis

  1. ~/.opencode/bin/opencode is a single self-contained binary
  2. No data/ directory exists under ~/.opencode/
  3. No patch.json file exists in the install
  4. strings on the binary shows no patch.json reference (not embedded)
  5. opencode --version reports 1.18.12 = current latest tag
  6. opencode upgrade cannot fetch a different build (no newer release)

The from '' (empty string) in the error suggests the bundler lost
the source module's directory at compile time, so the relative path
../data/patch.json resolves from the current working directory
(which is empty / '').

Workaround

Use curl via bash for HTTP fetches until fixed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.