nvm-windows切换node版本提示exit status 1: The system cannot find the path specified.

img

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
D:\Users\th>nvm uninstall 16.14.2
Uninstalling node v16.14.2... done
D:\Users\th>nvm install lts
Downloading node.js version 16.14.2 (64-bit)...
Extracting...
Complete


Installation complete. If you want to use this version, type

nvm use 16.14.2

D:\Users\th>nvm use 16.14.2
exit status 1: The system cannot find the path specified.

D:\Users\th>nvm use 16.14.2
exit status 1: The system cannot find the path specified.

D:\Users\th>nvm use 16.14.2
Now using node v16.14.2 (64-bit)

解决方案:

原因是在安装时候选的那个目录不存在。所以这里要手动去建立一下nvm才能给软连接过去

img