Skip to content

fix: pass scoped globals to npm with forward slashes - #31

Merged
coreybutler merged 1 commit into
mainfrom
fix/scoped-from-module-name
Nov 5, 2026
Merged

coreybutler merged 1 commit into
mainfrom
fix/scoped-from-module-name

Conversation

@coreybutler

Copy link
Copy Markdown
Contributor

What

  • Build scoped global module names as @scope/name (forward slash) in getModuleList / listModulesAt
  • Add unit test covering scoped package naming on Windows

Why

nvm install --from used filepath.Join for scoped package names, so Windows produced @scope\name. npm treats that as a local folder path and fails with ENOENT, marking the whole version install failed.

Fixes nvm-windows/nvm#1537

Testing

  • go test ./installer -run TestListModulesAtScopedNamesUseSlash

Risk

Low — naming fix for --from / --copy-from module lists; FS paths still use filepath.Join.

nvm install --from rebuilt scoped package names via filepath.Join, so Windows produced @scope\name and npm treated it as a local path (ENOENT). Use npm's @scope/name form instead.

Fixes nvm-windows/nvm#1537

Signed-off-by: coreybutler <770982+coreybutler@users.noreply.github.com>
@coreybutler
coreybutler merged commit d7408eb into main Nov 5, 2026
5 of 6 checks passed
@coreybutler
coreybutler deleted the fix/scoped-from-module-name branch November 5, 2026 18:15
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.

nvm install --from fails on scoped global packages (@scope\name passed to npm with backslash)

1 participant