天天看点

记录-Windows10 cnpm报禁止运行脚本

记录-Windows10 cnpm报禁止运行脚本

-> cnpm install

cnpm : 无法加载文件 C:\Program Files\nodejs\node_global\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

 选择 

Y  更改策略

记录-Windows10 cnpm报禁止运行脚本

附加:给软件设置以管理员身份运行。因为我在使用vscode 终端时没有权限

继续阅读