windows中vs code无法yarn install

Posted kimiier

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了windows中vs code无法yarn install相关的知识,希望对你有一定的参考价值。

问题描述:
https://image.cha138.com/20210516/88659451fd5c4f9aa7eddc1805376caa.jpg

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

解决方法:
以管理员身份运行vscode;
执行:get-ExecutionPolicy,显示Restricted,表示状态是禁止的;
执行:set-ExecutionPolicy RemoteSigned;
这时再执行get-ExecutionPolicy,就显示RemoteSigned;

https://image.cha138.com/20210516/03170cd7822641549557431614d96de0.jpg

————————————————
版权声明:本文为CSDN博主「一只勤奋的考拉」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/hj_001/article/details/108379323

以上是关于windows中vs code无法yarn install的主要内容,如果未能解决你的问题,请参考以下文章

VS code上跑yarn start报running scripts is disabled on this system错误的解决方法

VS code上跑yarn start报running scripts is disabled on this system错误的解决方法

VS code上跑yarn start报running scripts is disabled on this system错误的解决方法

无法使用 VS Code 在 Windows 机器上为 linux 构建 .Net core 3.0 项目

Windows下使用GDB + VS Code调试Rust程序

vs code无法添加夜神模拟器