anomalyco / anomalyco/opencode
webfetch tool fails: `Cannot find module '../data/patch.json' from ''`
Open
@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
~/.opencode/bin/opencodeis a single self-contained binary- No
data/directory exists under~/.opencode/ - No
patch.jsonfile exists in the install stringson the binary shows nopatch.jsonreference (not embedded)opencode --versionreports 1.18.12 = current latest tagopencode upgradecannot 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.