powershell 不能运行cnpm

Restricted——默认的设置, 不允许任何script运行
AllSigned——只能运行经过数字证书签名的script
RemoteSigned——运行本地的script不需要数字签名,但是运行从网络上下载的script就必须要有数字签名
Unrestricted——允许所有的script运行

在终端执行:get-ExecutionPolicy,显示Restricted(表示状态是禁止的)

在终端执行:set-ExecutionPolicy RemoteSigned

如果报错 可执行 Set-ExecutionPolicy -Scope CurrentUser 再次执行 set-ExecutionPolicy RemoteSigned

powershell 不能运行cnpm
https://blog.51cto.com/u_15127700/3976154

posted @ 2022-07-04 15:15  ethon-wang  阅读(175)  评论(0编辑  收藏  举报