spawn EACCES 🟩 Node.js

Error: spawn EACCES

Node tried to execute a file that isn’t executable (missing +x permission) or isn’t a program.

Seen on: Node.js

Meaning

Bundled binaries (esbuild, puppeteer Chrome, scripts) lose their execute bit when copied from Windows/zip archives or installed with --no-bin-links.

Common causes

  • Binary without execute permission
  • Spawning a script without a shebang
  • Mount with noexec (Docker volumes, /tmp)

⚡ Quick fix

  1. chmod +x the binary
  2. Reinstall the package (rm -rf node_modules && npm ci)
  3. Avoid noexec mounts

Detailed fix by platform

Linux

  1. chmod +x node_modules/.bin/* node_modules/esbuild/bin/esbuild

How to diagnose

  1. File — Which executable?
  2. Mode — ls -l shows x?

🧠 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.