microsoft / microsoft/WindowsDeveloperConfig
Conflict: dev-config installs nvm4w but TypeScript workload installs Node.js LTS directly
まだ誰も着手していません。
- 主要言語
- PowerShell
- スター
- 2.2k
- フォーク
- 168
- 平均マージ
- 5時間 14分
- マージ済み PR(30日)
- 5
説明
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:
- PATH points to
C:\nvm4w\nodejs(set by nvm4w) - 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 throughnvm install nodeandnpmare not found on PATH despite Node.js being physically installed
Steps to Reproduce
- Apply the main
windows-dev-config/dev-config.winget(installs nvm4w, addsC:\nvm4w\nodejsto PATH) - Apply
Workloads/typescript/configuration.winget(installsOpenJS.NodeJS.LTStoC:\Program Files\nodejs) - Open a new terminal
- Run
node --version→ command 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)
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
dev-config.winget と Workloads/typescript/configuration.winget を比較し、PATH の処理が選択したアプローチの一部である場合は refresh-path.ps1 を調査します。両方の構成を Windows に適用し、新しいターミナルで競合する Node インストールなしに node --version と npm が利用できることを確認します。選択した調整戦略は明示的で再現可能である必要があります。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- node.js, powershell, typescript
- 領域
- developer-experience, devops, tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100