nvm use 退出状态 1:访问被拒绝

Lav*_*Ren 11 node.js npm nvm yarnpkg nvm-windows

我之前安装了nodejs,没有nvm,然后通过卸载并删除所有文件将其彻底删除。

我使用的是 Windows 10。

当我以管理员身份使用 run powershell 时它可以工作,但我无法在 vscode 中使用yarn。

PS C:\Users\laveen> nvm ls

No installations recognized.
PS C:\Users\laveen> nvm install 14.18.1
Downloading node.js version 14.18.1 (64-bit)...
Complete
Creating C:\Users\laveen\AppData\Roaming\nvm\temp

Downloading npm version 6.14.15... Complete
Installing npm v6.14.15...

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

nvm use 14.18.1
PS C:\Users\laveen> nvm use 14.18.1
exit status 1: Access is denied.
Run Code Online (Sandbox Code Playgroud)

小智 14

以管理员身份运行命令提示符。


Fer*_*han 10

1.运行与管理员命令窗口相同的命令,如图所示

2.nvm使用14.8.1

在此输入图像描述