首页 > 系统相关 >Windows11中windowsPowerShell运行hexo命令报错

Windows11中windowsPowerShell运行hexo命令报错

时间:2022-09-04 10:45:10浏览次数:103  
标签:hexo 命令 Windows11 windowsPowerShell 报错 ExecutionPolicy

修改设置

  • Windows11安装后,系统自带的终端输入命令,git和node都可以使用,hexo不可以,提示:
hexo : 无法加载文件 C:\Users\username\AppData\Roaming\npm\hexo.ps1`,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 `about_Execution_Policies`。
所在位置 行:1 字符: 1

解决方法

  • 用管理员权限打开 Windows PowerShell ,运行以下命令:
Set-ExecutionPolicy -ExecutionPolicy UNRESTRICTED

参考资料:
https://cloud.tencent.com/developer/article/1866958

标签:hexo,命令,Windows11,windowsPowerShell,报错,ExecutionPolicy
From: https://www.cnblogs.com/skillfans/p/16654480.html

相关文章