You installed esbuild for another platform than the one you're currently using.
node_modules contains esbuild’s binary for a different OS/CPU.
Seen on:
npm
Meaning
Same root cause as other native binaries: node_modules shared between host and container/VM (or Rosetta vs native on Apple Silicon).
Common causes
- Bind-mounted node_modules from macOS into Linux
- Installed under Rosetta, running natively (or vice versa)
⚡ Quick fix
- Reinstall in the target environment
- Don’t share node_modules between host and container (use a volume)
Detailed fix by platform
Docker
volumes: ["./:/app", "/app/node_modules"]
How to diagnose
- Platform — Install vs run environment
- Recent change — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026