cnpm : 无法加载文件 C:\Users\Yang.Gu\AppData\Roaming\npm\cnpm.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 htt
ps:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。
所在位置 行:1 字符: 1
+ cnpm
+ ~~~~
+ CategoryInfo : SecurityError: (:) [],PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
使用管理员运行cmd窗口仍然报错,
可尝试运行一下语句
Set-ExecutionPolicy RemoteSigned -Scope Process
或者以下语句:
set-executionpolicy remotesigned
参考:https://www.jianshu.com/p/4eaad2163567