VS IDE中才把cnpm 弄好,win10系统执行的时候又出妖蛾子了。VS IDE终端执行cnpm install报错如下:
无法加载文件 C:\Users\xxx\AppData\Roaming\npm\cnpm.ps1,因为在此系统上禁止运行脚本
本人亲测有效,解决步骤如下:
1、在win10 系统中搜索框 输入 Windows PowerShell,选择 管理员身份运行
2、打开了powershell命令行之后,输入set-ExecutionPolicy RemoteSigned,将权限更改为A,
3、通过 get-ExecutionPolicy 查看当前的状态:RemoteSigned