Could not load file C:\Users\asus\AppData\Roaming\npm\tsc.ps1 because running scripts is prohibited on this system. When VScode clicks on the terminal to run typescript, an error is reported

Error content:

Could not load file C:\Users\asus\AppData\Roaming\npm\tsc.ps1 because running scripts is prohibited on this system. For more information, see https:/go.microsoft.com/

screenshot:

Solution:

  1. Search for powershell on the computer, click to run as administrator

2. Enter in the command box: set-ExecutionPolicy RemoteSigned, press Enter

3. After the information in the above picture pops up, enter A and press Enter to end

4. Go back to VSCode and run again

Guess you like

Origin blog.csdn.net/qq_46103732/article/details/125227514