无法加载文件 D:\nodejs\node_global\vue.ps1,因为在此系统上禁止运行脚本。

在PowerShell中运行npm、vue等指令报错:

无法加载文件 D:\nodejs\node_global\vue.ps1,因为在此系统上禁止运行脚本。

这是因为PowerShell的执行政策阻止了该操作,需要解除受限状态。

操作如下:

1. 在Windows系统搜索PowerShell,以管理员身份运行

 2. 在命令框输入:set-ExecutionPolicy RemoteSigned, 然后输入A

猜你喜欢

转载自blog.csdn.net/weixin_55992854/article/details/123472196