Skip to content

Add .nvmrc pinning Node 22 - #421

Closed
mtheeraj148-netizen wants to merge 1 commit into
trailhq:mainfrom
mtheeraj148-netizen:chore/pin-node-22
Closed

mtheeraj148-netizen wants to merge 1 commit into
trailhq:mainfrom
mtheeraj148-netizen:chore/pin-node-22

Conversation

@mtheeraj148-netizen

Copy link
Copy Markdown

Summary

  • Adds .nvmrc pinning Node 22.23.2 at the repo root.

Why

Node 26 (bleeding-edge/unstable) bundles a common.gypi that unconditionally injects the Clang-only -flto=thin flag into native-module builds. On Windows with MSVC, this breaks the linker (LNK1117: syntax error in option 'opt:lldltojobs=2') when installing dependencies that require native compilation, such as tree-sitter-kotlin.

The project already requires "node": ">=20" in package.json; pinning to Node 22 LTS via .nvmrc makes npm install work out of the box for contributors who run nvm use (a common convention many nvm/fnm setups auto-apply).

Test plan

  • Verified npm install fails on Node 26.8.1 with the LNK1117 linker error building tree-sitter-kotlin
  • Verified npm install succeeds cleanly on Node 22.23.2 with .nvmrc in place

Node 26 (bleeding-edge/unstable) bundles a common.gypi that injects
the Clang-only -flto=thin flag, which breaks MSVC linking for native
modules (e.g. tree-sitter-kotlin) on Windows. Pin to Node 22 LTS,
which the project already requires (package.json: "node": ">=20"),
so native builds work out of the box.
@trailhq-graft

trailhq-graft Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

🌱 graft blast radius

Nothing outside this diff depends on it. 0 areas changed; no indexed dependents at depth 2.

⚠️ 1 changed file not in the graph (.nvmrc) — no parser claims the extension, or the index predates the file.

graft blast · origin/main...HEAD · depth 2 · 1 changed file

Open the interactive graph → — click an area to see its dependent symbols at file:line.

github-actions Bot added a commit that referenced this pull request Sep 18, 2026
@shhdwi

shhdwi commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

Thanks! Pinning .nvmrc does not change what npm i -g @nanonets/graft users get. In our repro, a missing Kotlin prebuild still crashes the CLI at startup. We are fixing the root cause instead: making tree-sitter-kotlin an optionalDependency (#325), which npm tolerates when its install script fails, and isolating each grammar load (#337).

@shhdwi shhdwi closed this Sep 29, 2026
github-actions Bot added a commit that referenced this pull request Sep 29, 2026
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.

2 participants