Description
sudo npm i -g opencode-ai@latest
npm ERR! code 1
npm ERR! path /usr/local/lib/node_modules/opencode-ai
npm ERR! command failed
npm ERR! command sh -c node ./postinstall.mjs
npm ERR! file:///usr/local/lib/node_modules/opencode-ai/postinstall.mjs:25
npm ERR! const platform = platformMap[os.platform()] ?? os.platform()
npm ERR! ^
npm ERR!
npm ERR! SyntaxError: Unexpected token '?'
npm ERR! at Loader.moduleStrategy (internal/modules/esm/translators.js:133:18)
npm ERR! at async link (internal/modules/esm/module_job.js:42:21)
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2026-05-25T12_30_15_575Z-debug-0.log
Plugins
No response
OpenCode version
1.15.10 (opencode-ai@latest)
Steps to reproduce
sudo npm i -g opencode-ai@latest
npm --version
8.5.1
node --version
v12.22.9
Screenshot and/or share link
No response
Operating System
Ubuntu 22.04.5 LTS (GNU/Linux 6.6.114.1-microsoft-standard-WSL2 x86_64)
Terminal
Windows Terminal
Description
Plugins
No response
OpenCode version
1.15.10 (opencode-ai@latest)
Steps to reproduce
sudo npm i -g opencode-ai@latest
Screenshot and/or share link
No response
Operating System
Ubuntu 22.04.5 LTS (GNU/Linux 6.6.114.1-microsoft-standard-WSL2 x86_64)
Terminal
Windows Terminal