yarn : 无法加载文件 因为在此系统因为在此系统上禁止运行脚本
yarn : 无法加载文件 D:\Mr.Huang\xxx\xxx\xxx\xxx\Install\node_global\yarn.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Polic ies。
所在位置 行:1 字符: 1
- yarn : 无法加载文件 D:\Mr.Huang\xxx\xxx\xxx\xxx\Install\node_global\yar …
-
+ CategoryInfo : SecurityError: (:) [],PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess
1、在windows搜索powershell,右键以管理员身份运行
2、在本地计算机上运行您编写的未签名脚本和来自其他用户的签名脚本,使用以下命令
将计算机上的 执行策略更改为 RemoteSigned
set-ExecutionPolicy RemoteSigned
注意事项:有可能它会有别的提示,出现了就按它提示的命令一步步执行就好了
想深入了解下可以看下微软的文档:
https://learn.microsoft.com/zh-cn/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.3