Skip to content

Enforce supported Node version for backend#2

Open
neryluc wants to merge 1 commit into
vakila:mainfrom
neryluc:neryluc/patch-01
Open

Enforce supported Node version for backend#2
neryluc wants to merge 1 commit into
vakila:mainfrom
neryluc:neryluc/patch-01

Conversation

@neryluc

@neryluc neryluc commented Jun 19, 2026

Copy link
Copy Markdown

Enforce supported Node version for the backend

Installing the backend on a newer Node release (e.g. Node 26) fails because the native better-sqlite3 dependency has no prebuilt binary and its build breaks against the current V8 API. The result is a long, confusing C++ compile log that doesn't make the real cause obvious.

Rather than bumping dependencies (which would break users on older Node), this PR pins the supported Node range and gives a clear error:

  • package.json — add "engines": { "node": ">=20 <25" } to declare the supported range.
  • .npmrc — set engine-strict=true so npm install fails fast with an EBADENGINE message naming the required vs. actual version, instead of attempting the build.
  • .node-version — pin 24 so nvm/fnm/mise auto-select a compatible version.
  • README.md — note the Node version requirement.

Verified: on Node 26 npm install now stops immediately with a clear EBADENGINE error; on Node 24 it installs cleanly with no build errors.

Note: engine-strict makes the version a hard requirement rather than a warning — happy to drop it if you'd prefer engines to stay advisory.

Open for feedbacks! Love the course! <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant