fix: pin Node.js to 22 so pnpm install/dev work on Node 26+ - #68
Open
trivedi-vatsal wants to merge 1 commit into
Open
fix: pin Node.js to 22 so pnpm install/dev work on Node 26+#68trivedi-vatsal wants to merge 1 commit into
trivedi-vatsal wants to merge 1 commit into
Conversation
Node 26 satisfies the README's ">= 20" requirement but breaks the build. The dependency tree's engines allow 20.x-25.x only, and better-sqlite3 has no prebuilt binary for Node 26's ABI, so `pnpm install` falls back to a source compile that fails against Node 26's V8 headers. That aborts install before bin-linking, which then surfaces as `turbo: command not found` on `pnpm dev`. - .npmrc: use-node-version=22.23.1 so pnpm auto-downloads and runs on a compatible Node for install and scripts, regardless of the system/nvm default Node version. - .nvmrc: 22 for nvm users. - README: correct the Node prerequisite (20.x-25.x) and document the pinning. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@trivedi-vatsal is attempting to deploy a commit to the helder-4496's projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
Problem
On Node.js 26, a fresh
pnpm install/pnpm devfails with:The README lists the prerequisite as Node.js >= 20, which Node 26 satisfies — but the build is actually broken on it.
Root cause
enginesonly allow Node20.x || 22.x || 23.x || 24.x || 25.x(i.e. not 26+).better-sqlite3ships no prebuilt binary for Node 26's ABI, sopnpm installfalls back to a source compile that fails against Node 26's V8 headers.node_modules/.bin/is linked, so the next command surfaces the confusingturbo: command not found— a symptom, not the real cause.Fix
Pin the Node version the toolchain uses, and correct the docs:
.npmrc—use-node-version=22.23.1. pnpm auto-downloads and runs on a compatible Node for install and all scripts, regardless of the system or nvm default. This makespnpm install/pnpm devwork out of the box..nvmrc—22, for nvm users (nvm use).20.x–25.x(Node 26+ unsupported) and document the pinning.Verification
With a plain shell on Node 26 (no nvm), and only these changes applied:
pnpm installcompletes (better-sqlite3 uses a prebuilt binary under Node 22).pnpm devstarts both apps cleanly — web on :3000, landing on :3001.🤖 Generated with Claude Code