1

我安装了 node v16.13.0,npm v8.1.0 java 版本 1.8.0_211,我以为我也安装了 yarn,但是尝试使用 yarn global add expo-cli 安装 expo 我得到:

yarn : File C:\Program Files\nodejs\yarn.ps1 cannot be loaded. The file C:\Program Files\nodejs\yarn.ps1 is not
digitally signed. You cannot run this script on the current system. For more information about running scripts and
setting execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ yarn global add expo-cli
+ ~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

然后我尝试再次安装yarn,但现在我100%无法获得它:

PS C:\Users\user> npm install -g yarn

changed 1 package, and audited 2 packages in 1s

found 0 vulnerabilities

但是运行 yarn --version 我得到了和以前一样的错误:

yarn : File C:\Program Files\nodejs\yarn.ps1 cannot be loaded. The file C:\Program Files\nodejs\yarn.ps1 is not
digitally signed. You cannot run this script on the current system. For more information about running scripts and
setting execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ yarn --version
+ ~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess
4

0 回答 0