yarn 无法加载文件 CUsersAdministratorAppDataRoamingnpmyarn.ps1,因为在此系统上禁止运行脚本。的解决方案

yarn : 无法加载文件 C:\Users\Administrator\AppData\Roaming\npm\yarn.ps1,因为在此系统上禁止运行脚本。

1、问题描述

执行yarn相关命令时报错:

yarn : 无法加载文件 C:\Users\Administrator\AppData\Roaming\npm\yarn.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。

在这里插入图片描述

2、分析解决

搜索powershell,右键以管理员身份运行;
输入:set-ExecutionPolicy RemoteSigned
选择全是即可;

d**;
选择全是即可;

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/2301_76866366/article/details/131631484