Skip to content

fnm download snippet fails on Windows #7487

Open
@MikeMcC399

Description

@MikeMcC399

URL:

https://nodejs.org/en/download

Browser Name:

Microsoft Edge

Browser Version:

133.0.3065.59 (Official build) (64-bit)

Operating System:

Windows 11 24H2 10.0.26100.3037

How to reproduce the issue:

Steps

Copy and run the download instructions from https://nodejs.org/en/download for Windows using fnm with npm in a PowerShell terminal:

# Download and install fnm:
winget install Schniz.fnm

# Download and install Node.js:
fnm install 22

# Verify the Node.js version:
node -v # Should print "v22.13.1".

# Verify npm version:
npm -v # Should print "10.9.2".

Expectation

The snippet should run without error.

The implicit assumption of offering a "Copy to clipboard" button with a label "PowerShell" is that the shell script can be copied and run as-is.

In fact, a user needs to visit https://github.com/Schniz/fnm/blob/master/README.md and navigate a complex set of instructions to set up fnm to work on Windows.

Actual

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\Users\mikem> # Download and install fnm:
PS C:\Users\mikem> winget install Schniz.fnm
Found Fast Node Manager [Schniz.fnm] Version 1.38.1
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Successfully verified installer hash
Extracting archive...
Successfully extracted archive
Starting package install...
Command line alias added: "fnm"
Successfully installed
PS C:\Users\mikem>
PS C:\Users\mikem> # Download and install Node.js:
PS C:\Users\mikem> fnm install 22
Installing Node v22.13.1 (x64)
PS C:\Users\mikem>
PS C:\Users\mikem> # Verify the Node.js version:
PS C:\Users\mikem> node -v # Should print "v22.13.1".
node : The term 'node' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ node -v # Should print "v22.13.1".
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (node:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Users\mikem>
PS C:\Users\mikem> # Verify npm version:
PS C:\Users\mikem> npm -v # Should print "10.9.2".
npm : The term 'npm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ npm -v # Should print "10.9.2".
+ ~~~
    + CategoryInfo          : ObjectNotFound: (npm:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Related

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    🏗 In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions