VS Code:因为在此系统上禁止运行脚本,解决方法

自己用vue-cli脚手架创建项目时突然遇到这个问题

错误信息


无法加载文件 C:\Users\AppData\Roaming\npm\vue.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies

在这里插入图片描述


解决方法


  1. 以管理员身份打开PowerShell 输入set-executionpolicy remotesigned
  2. 查看是否改变策略成功 输入get-executionpolicy如果显示remotesigned则表示更改成功。

在这里插入图片描述


到此结束

猜你喜欢

转载自blog.csdn.net/qq_34082921/article/details/128499560