nvm-windows
nvm-windows copied to clipboard
nvm install of node gives broken node installation on Windows 11
Install nvm-setup.exe on Windows 11 Run nvm install lts nvm use lts Executing node gives this error:
C:\Users\h279518>node version node:internal/modules/cjs/loader:959 throw err; ^
Error: Cannot find module 'C:\Users\h279518\version' ←[90m at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15)←[39m ←[90m at Function.Module._load (node:internal/modules/cjs/loader:804:27)←[39m ←[90m at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)←[39m ←[90m at node:internal/main/run_main_module:17:47←[39m { code: ←[32m'MODULE_NOT_FOUND'←[39m, requireStack: [] }
C:\Users\h279518>nvm list
- 16.17.0 (Currently using 64-bit executable)
Do you have a prior version of Node installed?
On a fresh Win11 machine, I cannot recreate this:

This makes me think a prior installation may be conflicting with NVM. To check, use PowerShell to run gcm node.exe, which will tell you where Windows is looking for the node executable. For example:
If the Source doesn't match your NVM_LINK, then another Node installation is preventing the NVM4W node installation from being run.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.