Could not load file D:\nodejs\node_global\vue.ps1 because running scripts is prohibited on this system.

Errors are reported when running npm, vue and other commands in PowerShell:

Could not load file D:\nodejs\node_global\vue.ps1 because running scripts is prohibited on this system.

This is because PowerShell's execution policy prevents the operation and needs to be unrestricted.

The operation is as follows:

1. Search for PowerShell on the Windows system and run it as an administrator

 2. In the command box, enter: set-ExecutionPolicy RemoteSigned , then enter A

 

Guess you like

Origin blog.csdn.net/weixin_55992854/article/details/123472196