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

解决方案:

1、点击开始按钮》找到Windows PowerShell 》管理员身份运行Windows PowerShell

2、在Windows PowerShell窗口  输入 》 set-ExecutionPolicy RemoteSigned (运行)》根据提示输入  y

3、继续回到项目执行serve -s dist 就成功了

posted @ 2021-09-30 08:36  Strugglinggirl  阅读(567)  评论(0编辑  收藏  举报