NodeDeployDependencies

The engine "node" is incompatible / unsupported Node version on deploy

error some-package@x: The engine "node" is incompatible with this module. Expected version ">=20". Got "18.x"

In short: Your host is building with an older (or different) Node.js than your packages need.

Why it happens

Your laptop runs one Node version and the host uses its default or a pinned older one. Newer frameworks drop support for old Node versions.

How to fix it

  1. Check what you run locally: node -v.
  2. Pin it for the host: add "engines": { "node": "22.x" } (or your version) to package.json, and/or set the Node version in the host's project settings.
  3. Add a .nvmrc file with the same version for collaborators and some CI tools.
  4. Prefer an active LTS version.
Don't: Don't ignore engines with flags; the package may genuinely need newer Node APIs.

Copy-paste fix prompt

3 · The fix promptPaste into Cursor, Claude Code, Codex, Lovable, Bolt, Replit or v0
I'm getting this error in my app:

error some-package@x: The engine "node" is incompatible with this module. Expected version ">=20". Got "18.x"

[Paste the full error, stack trace, and the file it points to here]

Likely cause: Your host is building with an older (or different) Node.js than your packages need.

Task: Find the Node version required by my dependencies and framework, and set it consistently in package.json engines, .nvmrc, and tell me which host setting to change.

Rules:
- First explain the root cause in 2 sentences and list the files you'll change.
- Make the smallest change that fixes it. Don't refactor unrelated code.
- Don't disable security or checks (RLS, auth, signature verification, type checking, CORS allow-all) to make the error disappear.
- Never print or hard-code secret keys.
- Finish by telling me exactly how to verify the fix.

Common with: Cursor, Bolt, Replit. Last reviewed 2026-11-13.

Related fixes

← All fixes · Still stuck? Use the diagnose-first prompt