microsoft / microsoft/WindowsDeveloperConfig

Conflict: dev-config installs nvm4w but TypeScript workload installs Node.js LTS directly

Open
#55 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PowerShell
Stars
2.2k
Forks
168
Avg merge
5h 14m
Merged PRs (30d)
5

Description

Summary

The main dev-config.winget installs NVM for Windows (CoreyButler.NVMforWindows), which manages Node.js versions via a symlink at C:\nvm4w\nodejs and adds that to PATH. However, the TypeScript workload (Workloads/typescript/configuration.winget) separately installs OpenJS.NodeJS.LTS directly via winget, which places Node at C:\Program Files\nodejs.

This creates a broken state where:

  1. PATH points to C:\nvm4w\nodejs (set by nvm4w)
  2. The nvm4w symlink targets a version directory (e.g. C:\Users\<user>\AppData\Local\nvm\v24.16.0) that does not exist because Node was installed via the MSI package, not through nvm install
  3. node and npm are not found on PATH despite Node.js being physically installed

Steps to Reproduce

  1. Apply the main windows-dev-config/dev-config.winget (installs nvm4w, adds C:\nvm4w\nodejs to PATH)
  2. Apply Workloads/typescript/configuration.winget (installs OpenJS.NodeJS.LTS to C:\Program Files\nodejs)
  3. Open a new terminal
  4. Run node --versioncommand not found

Root Cause

nvm4w owns the PATH entry (C:\nvm4w\nodejs) and expects Node to be installed via nvm install <version> + nvm use <version>. The direct winget install of OpenJS.NodeJS.LTS puts node elsewhere and nvm4w's symlink points to a non-existent directory.

Suggested Fix

Option A — TypeScript workload defers to nvm4w:
Replace the OpenJS.NodeJS.LTS winget package resource with a RunCommandOnSet that runs:

nvm install lts
nvm use lts

Option B — Remove nvm4w from dev-config, let workloads install Node directly:
Remove CoreyButler.NVMforWindows from dev-config.winget and ensure C:\Program Files\nodejs ends up on PATH (the Node MSI installer does this by default).

Option C — Keep both but coordinate PATH:
If both are intentional, the TypeScript workload should add C:\Program Files\nodejs to PATH explicitly, or the refresh-path.ps1 should detect and resolve the nvm4w symlink conflict.

Environment

  • Windows 11 (Build 2026)
  • winget v1.28.240
  • CoreyButler.NVMforWindows 1.2.2
  • OpenJS.NodeJS.22 24.16.0 (installed by winget as the LTS package)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare dev-config.winget with Workloads/typescript/configuration.winget, then inspect refresh-path.ps1 if PATH handling is part of the chosen approach. Apply both configurations on Windows and verify that node --version and npm are available in a new terminal without conflicting Node installations; the selected coordination strategy should be explicit and reproducible.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, powershell, typescript
Domain
developer-experience, devops, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.