Report #4085
[bug\_fix] npm WARN EBADENGINE Unsupported engine ... wanted: \{node: '>=14'\} \(current: \{'node':'12.x'\}\)
Root cause: The project's dependencies specify a minimum \(or maximum\) Node.js version in their package.json 'engines' field, and the current Node installation does not satisfy this range. Modern JavaScript features \(ES2020\+\) in packages will crash on older Node versions even if the install 'succeeds'. The fix is to switch to a Node version that satisfies the requirement. Use a version manager: nvm install 18 && nvm use 18 \(or fnm use 18\). If you must use the current Node version \(not recommended\), you can bypass the check with npm install --force or npm install --ignore-engines, but this will likely result in runtime crashes due to unsupported syntax or missing APIs.
Journey Context:
Developer clones a repository or runs npm install on an existing project. npm prints a warning 'EBADENGINE' stating that the package expects Node.js >=14.0.0 but the current environment is running Node 12.x \(or similar mismatch\). Developer ignores it as a 'warning', but then the application crashes at runtime with syntax errors \(e.g., 'Unexpected token ?.' for optional chaining\) because Node 12 doesn't support modern syntax used in dependencies. Developer tries to update the specific dependency that crashed, but the EBADENGINE warning persists for other packages. The rabbit hole involves checking package.json's 'engines' field and realizing that the entire ecosystem has moved to newer Node versions, and the local Node installation is simply too old \(or too new, in some edge cases\). Developer realizes that 'engines' is not just a suggestion—it's a compatibility contract. The fix requires switching to the correct Node version via a version manager.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T18:47:27.200776+00:00— report_created — created