【发布时间】: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 安装可以,但不推荐。
【问题讨论】: