You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unable to run opencode when node/npm is managed by Volta #197
I use Volta to manage my node version. I am able to install and run claude code via npm without problems. When I install opencode via npm however it is unable to run:
npm i -g opencode-ai@latest
opencode auth login
Volta error: Could not execute command.
See `volta help install` and `volta help pin`for info about making tools available.
I have tried uninstalling and reinstalling with npm and using volta install rather than npm with the same "could not execute command" error. The volta help commands aren't giving me any hints. I'm not quite sure what's going on since other global npm tools work just fine, but wanted to create this issue in case other Volta users run into it.
For now I am installing via Homebrew and opencode works great! Thanks for building this 😄
opencode doesn't use node at all it actually gets installed as a single file executable. not sure what volta is trying to do here - it must hook into some process that is being disrupted
The symbolic links in the opencode install were broken. In the image below the red paths are broken.
opencode-ai/lib/node_modules/opencode-ai/bin/opencode was pointing to a location in a tmp folder .tmpEJcan8/lib/node_modules/opencode-ai/node_modules/opencode-linux-x64/bin/opencode and not opencode-ai/lib/node_modules/opencode-ai/node_modules/opencode-linux-x64/bin/opencode. Fixing this link and opencode now runs for me
The package's postinstall script creates a symlink with an absolute path while the package is in a temporary directory during Volta installation. When Volta moves the package to its final location, the symlink becomes broken, pointing to a non-existent temporary path. This makes opencode unusable with Volta.
The postinstall script for the package uses fs.symlinkSync() with an absolute path to create the symlink. When Volta installs global packages, it:
Installs to a temporary directory first (e.g., ~/.volta/tmp/image/packages/.tmpwVekLa/)
Runs postinstall scripts (symlink created with absolute path to temp dir)
Moves the package to its final location (~/.volta/tools/image/packages/opencode-ai/)
The symlink remains pointing to the now-deleted temporary directory
I think changing it to a relative path instead would work, because the symlink would be preserved when volta moves the directory. If we update postinstall.mjs and change this line:
// OLD - creates absolute path symlinkfs.symlinkSync(binaryPath,binScript);// NEW - creates relative path symlinkfs.symlinkSync(path.relative(path.dirname(binScript),binaryPath),binScript);
I'm still facing the problem, I installed the latest version through Volta:
(base) <user>@<user>s-Mac-Studio ~ % cd ~/.volta/tools/image/packages/opencode-ai/
(base) <user>@<user>s-Mac-Studio opencode-ai % ls -l
total 0
drwxr-xr-x 3 <user> staff 96 Nov 4 16:57 bin
drwxr-xr-x 3 <user> staff 96 Nov 4 16:57 lib
(base) <user>@<user>s-Mac-Studio opencode-ai % cd bin
(base) <user>@<user>s-Mac-Studio bin % ls -l opencode
lrwxr-xr-x 1 <user> staff 44 Nov 4 16:57 opencode -> ../lib/node_modules/opencode-ai/bin/opencode
(base) <user>@<user>s-Mac-Studio bin % ls -l ../lib/node_modules/opencode-ai/bin/opencode
lrwxr-xr-x 1 <user> staff 126 Nov 4 16:57 ../lib/node_modules/opencode-ai/bin/opencode -> /Users/<user>/.volta/tmp/image/packages/.tmpVbIcJj/lib/node_modules/opencode-ai/node_modules/opencode-darwin-arm64/bin/opencode
(base) <user>@<user>s-Mac-Studio bin %
(base) <user>@<user>s-Mac-Studio bin %
(base) <user>@<user>s-Mac-Studio bin % ls -l /Users/<user>/.volta/tmp/image/packages/.tmpVbIcJj/lib/node_modules/opencode-ai/node_modules/opencode-darwin-arm64/bin/opencode
ls: /Users/<user>/.volta/tmp/image/packages/.tmpVbIcJj/lib/node_modules/opencode-ai/node_modules/opencode-darwin-arm64/bin/opencode: No such file or directory
(base) <user>@<user>s-Mac-Studio bin %
Reacted by Brian Vance Jr., Kevin Chen, Vincent Persyn and kolchagov
⚠️ Infrastructure Failure
Paperclip API is serving HTML (web app) instead of JSON. Unblock owner: @vincent — verify Paperclip server and PAPERCLIP_API_URL (currently http://127.0.0.1:3100).
Activity
thdxr commentedon Jun 19, 2025
opencode doesn't use node at all it actually gets installed as a single file executable. not sure what volta is trying to do here - it must hook into some process that is being disrupted
thdxr commentedon Jun 19, 2025
going to close this for now if someone has insight on how to fix this please leave a comment
mrloop commentedon Jun 24, 2025
The symbolic links in the opencode install were broken. In the image below the red paths are broken.
opencode-ai/lib/node_modules/opencode-ai/bin/opencodewas pointing to a location in a tmp folder.tmpEJcan8/lib/node_modules/opencode-ai/node_modules/opencode-linux-x64/bin/opencodeand notopencode-ai/lib/node_modules/opencode-ai/node_modules/opencode-linux-x64/bin/opencode. Fixing this link andopencodenow runs for memorgvanny commentedon Aug 15, 2025
The package's postinstall script creates a symlink with an absolute path while the package is in a temporary directory during Volta installation. When Volta moves the package to its final location, the symlink becomes broken, pointing to a non-existent temporary path. This makes opencode unusable with Volta.
The postinstall script for the package uses
fs.symlinkSync()with an absolute path to create the symlink. When Volta installs global packages, it:~/.volta/tmp/image/packages/.tmpwVekLa/)~/.volta/tools/image/packages/opencode-ai/)I think changing it to a relative path instead would work, because the symlink would be preserved when volta moves the directory. If we update
postinstall.mjsand change this line:That may fix it, if I'm not mistaken.
mrloop commentedon Aug 17, 2025
Thanks @morgvanny fix working for me 🎉 #2014
adonh commentedon Oct 5, 2025
plx fix in the default post-install script. TY!
rekram1-node commentedon Oct 6, 2025
hm ill take a look
fix: installation via volta broken due to symbolic links pointing to …
synappsysai commentedon Nov 4, 2025
I'm still facing the problem, I installed the latest version through Volta:
vdenoise commentedon May 5, 2026
Paperclip API is serving HTML (web app) instead of JSON. Unblock owner: @vincent — verify Paperclip server and
PAPERCLIP_API_URL(currentlyhttp://127.0.0.1:3100).Run ID:
$PAPERCLIP_RUN_ID