Enforce supported Node version for backend#2
Open
neryluc wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enforce supported Node version for the backend
Installing the backend on a newer Node release (e.g. Node 26) fails because the native
better-sqlite3dependency 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— setengine-strict=truesonpm installfails fast with anEBADENGINEmessage naming the required vs. actual version, instead of attempting the build..node-version— pin24so nvm/fnm/mise auto-select a compatible version.README.md— note the Node version requirement.Verified: on Node 26
npm installnow stops immediately with a clearEBADENGINEerror; on Node 24 it installs cleanly with no build errors.Open for feedbacks! Love the course! <3