Visual studio code terminal, how to run a command with administrator rights?

前端 未结 4 898
挽巷
挽巷 2020-12-04 20:34

The new version 1.2.0 include a terminal, but when I try to install any pack with node I get the npm ERR! code EPERM that I usually solve right clicking and running it as ad

4条回答
  •  一个人的身影
    2020-12-04 21:09

    Step 1: Restart VS Code as an adminstrator

    (click the windows key, search for "Visual Studio Code", right click, and you'll see the administrator option)

    Step 2: In your VS code powershell terminal run Set-ExecutionPolicy Unrestricted

提交回复
热议问题