Chocolatey安装Node.js和Yarn

2021-10-21 宋洋葱 宋洋葱 1 min

Windows 下安装 yarn,利 用chocolatey 软件包管理工具,比 npm 更快更稳定。

按照官网文档 安装 chocolatey

打开 powershell 输入命令:

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

然后使用 choco 安装 nodejs 和 yarn:

choco install -y nodejs yarn
# 安装完成后重新打开 shell 检测是否安装完成
node -v
yarn -v

参考文章:

Leave a Comment

Your email address will not be published. Required fields are marked *