[转]yarn 安装

在使用 Admin.net 时,按说明在 VS Code 中运行 yarn 提示不支持

按 https://blog.csdn.net/weixin_40808668/article/details/122606543 文章进行 yarn  安装

cnpm install -g yarn

然后遇到报错:

PS E:\Workspaces\Admin.NET\frontend> yarn
yarn : 无法加载文件 E:\Workspaces\JS\node_global\yarn.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的
 about_Execution_Policies。
所在位置 行:1 字符: 1
+ yarn
+ ~~~~
解决办法:以管理员身份运行powershell,运行以下命令,回复y 或 a:
set-ExecutionPolicy RemoteSigned

 

posted on 2023-04-03 14:27  z5337  阅读(37)  评论(0)    收藏  举报