【问题标题】:How do I install yarn on Windows 7 as non-administrator?如何以非管理员身份在 Windows 7 上安装 yarn?
【发布时间】:2018-02-09 14:12:32
【问题描述】:

如何以非管理员身份在 Windows 7 上安装 yarn?

Yarn documentation 提到了三种 Windows 安装方法:.msi 安装程序、Chocolatey 和 Scoop。

  • .msi 安装程序需要管理员权限,即使将安装路径设置为 %LocalAppData%\yarn
  • non-administrative Chocolatey installation 上运行 choco install yarn 失败,并在执行 C:\WINDOWS\System32\msiexec.exe 时出现 1603 错误代码。 ỳarn.MsiInstall.log 包含以下错误:Product: Yarn -- Error 1925. You do not have sufficient privileges to complete this installation for all users of the machine. Log on as administrator and then retry this installation. chocolateyinstall.ps1 包含一个名为 Start-ChocolateyProcessAsAdmin 的命令,但我没有看到任何标志。所以我认为这根本行不通。
  • Scoop 需要 Powershell >= 3,但在我的 Windows 7 机器上它是 PowerShell 2。

通过npm install -g yarn 安装可以,但不推荐。

【问题讨论】:

    标签: windows windows-7 yarnpkg


    【解决方案1】:

    好吧,Github 上 Yarn 的发布页面包含 .tar.gz 档案,例如https://github.com/yarnpkg/yarn/releases/download/v1.7.0/yarn-v1.7.0.tar.gz 在我的 Windows 7 (x64) 上运行。

    【讨论】:

      猜你喜欢
      • 2012-07-11
      • 2020-12-09
      • 1970-01-01
      • 2022-01-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-07-14
      • 1970-01-01
      相关资源
      最近更新 更多