Add Node 26 support - #268
Conversation
Expand the repository and published package engine ranges so downstream framework tests can run on Node 26. Add a Node 26 CI leg and document the new supported range. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6435e499-8b9d-4197-8ed5-ad0b0eb5ac37
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6435e499-8b9d-4197-8ed5-ad0b0eb5ac37
Require the Jest node environment version that fixes Node 26 localStorage warnings, and override the older transitive constraint from the Heft rig. This prevents successful tests from being reported as Rush warning failures. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6435e499-8b9d-4197-8ed5-ad0b0eb5ac37
Jest 30's jest-resolve pulls in unrs-resolver, whose napi-postinstall script downloads a native binding directly from the registry. That raw download is unauthenticated against the internal ODSP feed and fails with a 401, breaking rush update in the SPFx framework test pipeline. Add both resolver packages to globalNeverBuiltDependencies so the postinstall never runs and the packages fall back to their bundled WASM build. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5f52707e-be36-4e3b-852d-51275c6f6849
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Update the remaining repository-wide Node version guidance to consistently document Node 26 support.
Review effort: Lite
Findings: 1
Open (1)
Files not reviewed (1)
- common/config/rush/pnpm-lock.yaml: Generated file
Update the root README badge and the dev-environment setup doc to list the full supported range (Node 22, 24, and 26), matching the per-package READMEs and rush.json. Addresses the Copilot PR review finding about inconsistent Node version guidance. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5f52707e-be36-4e3b-852d-51275c6f6849
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Scope the resolver workaround appropriately and reconcile the contradictory Node.js prerequisite documentation.
Review effort: Lite
Findings: 1
Files not reviewed (1)
- common/config/rush/pnpm-lock.yaml: Generated file
svalenciasan
left a comment
There was a problem hiding this comment.
NIT: maybe we should update templates and claude.md to make sure everything is aligned:
- https://github.com/SharePoint/spfx/blob/main/CLAUDE.md#L9 — still says Node.js 22.14.0 or later (but < 23.0.0)
- Templates still declare
"node": ">=22.14.0 < 23.0.0", so newly created projects won't declare Node 24/26 support:- https://github.com/SharePoint/spfx/blob/main/templates/webpart-minimal/package.json#L5-L7
- https://github.com/SharePoint/spfx/blob/main/templates/webpart-noframework/package.json#L5-L7
- https://github.com/SharePoint/spfx/blob/main/templates/extension-application-customizer/package.json#L5-L7
- https://github.com/SharePoint/spfx/blob/main/templates/ace-generic-card/package.json#L5-L7
- https://github.com/SharePoint/spfx/blob/main/templates/copilot-component-react/package.json#L5-L7
- Also the matching examples for the templates
- Full list: https://github.com/search?q=repo%3ASharePoint%2Fspfx+%22%3E%3D22.14.0+%3C+23.0.0%22&type=code
Fine to do in a follow-up PR if we'd rather keep this one scoped to the repo toolchain.
Newly scaffolded projects (and the checked-in examples) still pinned only Node 22 in their engines field, so they would not advertise Node 24/26 support even though the toolchain now allows it. Update all template and example package.json engines ranges to match rush.json and the spfx-cli package, and update the CLAUDE.md prerequisite note. Addresses review NIT. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5f52707e-be36-4e3b-852d-51275c6f6849
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The template test snapshot must be regenerated and reviewed before approval.
Review effort: Lite
Findings: 1
Resolved since last review (1)
Files not reviewed (1)
- common/config/rush/pnpm-lock.yaml: Generated file
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
The global resolver install setting disables native bindings for all developer and CI installs instead of limiting the workaround to affected environments.
Review effort: Lite
Findings: 1
Files not reviewed (1)
- common/config/rush/pnpm-lock.yaml: Generated file
@microsoft/app-manifest's compiled build/index.js does require('fs-extra')
but only declares @types/fs-extra, so under pnpm's strict isolation the
SPFx copilotAgentPlugin fails to load with "Cannot find module 'fs-extra'"
when scaffolded solutions are built. Add a globalPackageExtensions entry
declaring the missing runtime dependency, mirroring the workaround already
present in odsp-web.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5f52707e-be36-4e3b-852d-51275c6f6849
…in load" This reverts commit df3ab07.


Description
Adds Node.js 26 to the supported engine ranges for Rush, the SPFx CLI, template tests, and the build rig. Also documents the new range and adds a Node 26 Ubuntu CI leg.
This allows downstream SPFx framework tests to run this repository on Node 26 instead of failing the Rush version gate. It also requires Jest 30.4 or newer and overrides the Heft rig's older transitive constraint, avoiding Node 26 localStorage warnings that Rush treats as test failures.
How was this tested?
rush change --verifyrush test-and-package-solution --production --timeline --verboseon Node 26.10.0rush test-and-package-solution --production --timeline --verboseon Node 22git diff --checkType of change