美文网首页
vs code yarn 无法使用

vs code yarn 无法使用

作者: 张中华 | 来源:发表于2022-01-16 22:00 被阅读0次

使用报错:

yarn : 无法加载文件 C:\Users\Administrator\AppData\Roaming\npm\yarn.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135 
170 中的 about_Execution_Policies。
所在位置 行:1 字符: 1
+ yarn start
+ ~~~~
    + CategoryInfo          : SecurityError: (:) [],PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

解决方案

  1. 以管理员权限打开powershell
  2. 执行:set-ExecutionPolicy RemoteSigned
  3. 查看:get-ExecutionPolicy

相关文章

网友评论

      本文标题:vs code yarn 无法使用

      本文链接:https://www.haomeiwen.com/subject/akgyfrtx.html