npm CLI shows '16-bit app' error on Windows when postinstall scripts are blocked
Windows users running npm-installed CLI tools like opencode-ai or Claude Code may encounter a confusing '16-bit application' error, even on modern 64-bit systems. The root cause is that these tools ship a small ASCII text stub as a placeholder executable, relying on a postinstall script to replace it with the real platform-specific binary. If npm is configured with ignore-scripts=true, an install-script allowlist, or omit=optional, that replacement never happens and the stub remains. Users can diagnose the issue by checking their npm config and inspecting the file size or first two bytes of the executable — a real binary starts with 'MZ' and is typically hundreds of megabytes. The fix involves identifying which npm setting blocked the scripts and re-running the install with those restrictions lifted.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in