cnpm报错 无法加载文件 C:\Users\Administrator\AppData\Roaming\npm\cnpm.ps1

175 阅读1分钟
“cnpm : 无法加载文件 C:\Users\Administrator\AppData\Roaming\npm\cnpm.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。
所在位置 行:1 字符: 1
+ cnpm install
+ ~~~~
    + CategoryInfo          : SecurityError: (:) [],PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess”

解决方法:使用管理员打开powershell,执行set-ExecutionPolicy RemoteSigned,选择A

齐活儿