Skip to content

fix(download): add Windows support for fnm - #9252

Merged
ovflowd merged 2 commits into
mainfrom
windows-fnm-download
Oct 31, 2026
Merged

ovflowd merged 2 commits into
mainfrom
windows-fnm-download

Conversation

@bmuenzenmeyer

@bmuenzenmeyer bmuenzenmeyer commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Description

Discussed as an action item out of nodejs/web-team#191 - I don't recall any blockers, and this is what I use on my Windows machine. It's superior to the current production Docker default.

Re-enables fnm as an install method on Windows.

  • Use the WIN OS key for fnm in constants.json
  • Add an "in lieu of restarting the shell" step to the fnm snippet (matching nvm and Vite+), which fixes the failure reported in fnm download snippet fails on Windows #7487:
    • Windows: fnm env --use-on-cd --shell powershell | Out-String | Invoke-Expression
    • macOS/Linux: eval "$(fnm env)"

Validation

Tested on Windows in PowerShell. Note: fnm 1.37.0 and 1.37.1 only accept --shell power-shell. Schniz/fnm#1264 fixed this in 1.37.2, and current releases accept powershell as documented in fnm's README.

Related Issues

Refs #7487, #7769

Assisted-by: a frontier model

Use the WIN key for fnm compatibility and add a shell env setup step to
the fnm snippet so fnm and node are usable without restarting the shell.

Signed-off-by: bmuenzenmeyer <brian.muenzenmeyer@gmail.com>
@bmuenzenmeyer
bmuenzenmeyer requested a review from a team as a code owner October 31, 2026 01:51
Copilot AI balanced review requested due to automatic review settings October 31, 2026 01:51
@vercel

vercel Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
nodejs-org Ready Ready Preview Oct 31, 2026 4:38am UTC

Request Review

@codecov

codecov Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.12%. Comparing base (34121cb) to head (f410ff4).
⚠️ Report is 6 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9252      +/-   ##
==========================================
+ Coverage   86.09%   86.12%   +0.03%     
==========================================
  Files          87       87              
  Lines        6149     6164      +15     
  Branches      369      369              
==========================================
+ Hits         5294     5309      +15     
  Misses        851      851              
  Partials        4        4              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The fnm instructions leave PATH and persistent shell-setup gaps on fresh installations and do not ensure the selected Node.js release is activated.

4 open issues
What changed in this PR

Restores fnm as a Windows installation option on the download page and adds shell initialization intended to address the failure reported in #7487.

Changes:

  • Adds Windows to fnm’s supported operating systems.
  • Adds PowerShell and macOS/Linux environment initialization before installing Node.js.
File Description
apps/​site/​util/​download/​constants.json Enables the fnm option for Windows.
apps/​site/​snippets/​en/​download/​fnm.bash Adds OS-specific fnm shell initialization.

Review effort: Balanced

Comment thread apps/site/snippets/en/download/fnm.bash Resolved
Comment thread apps/site/snippets/en/download/fnm.bash Resolved
Comment thread apps/site/snippets/en/download/fnm.bash Resolved
Comment thread apps/site/snippets/en/download/fnm.bash Resolved
@github-actions

Copy link
Copy Markdown
Contributor

📦 Build Size Comparison

Summary

Metric Value
Old Total First Load JS 7.21 MB
New Total First Load JS 7.21 MB
Delta 24.00 B (0.00%)

Changes

🔄 Modified Routes (4)
Route Old First Load JS New First Load JS Delta
/[locale] 1.69 MB 1.69 MB 📈 6.00 B (0.00%)
/[locale]/[...path] 1.69 MB 1.69 MB 📈 6.00 B (0.00%)
/[locale]/blog/[...path] 1.69 MB 1.69 MB 📈 6.00 B (0.00%)
/[locale]/download/archive/[version] 1.69 MB 1.69 MB 📈 6.00 B (0.00%)

Signed-off-by: bmuenzenmeyer <brian.muenzenmeyer@gmail.com>
@ovflowd
ovflowd merged commit e8f11ea into main Oct 31, 2026
16 of 17 checks passed
@ovflowd
ovflowd deleted the windows-fnm-download branch October 31, 2026 22:30

This branch was successfully deployed

1 active deployment
Preview — f410ff4f Deployed Oct 31, 2026 by vercel[bot]
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.

4 participants