项目描述
使用如下命令安装 Hexo 后运行报错:
npm install hexo-cli -g
问题描述
PS C:\Users\87897\Desktop\xavierjiezou.github.io> hexo s
hexo : 无法加载文件 C:\Users\87897\AppData\Roaming\npm\hexo.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID
=135170 中的 about_Execution_Policies。
所在位置 行:1 字符: 1
+ hexo s
+ ~~~~
+ CategoryInfo : SecurityError: (:) [],PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
解决方案
设置->隐私和安全性->开发者选项->允许本地PowerShell脚本在为签名的情况下运行
https://www.cnblogs.com/liruilong/p/14934788.html