Skip to main content

Node.js

简介

Node.js 是能够在服务器端运行JavaScript 的开放源代码、跨平台 JavaScript 运行环境。

安装#

前置条件

请先阅读 Chocolatey

PowerShell
choco install nodejs

安装包管理器#

PowerShell
choco install yarn

运行#

安装完成之后,关闭当前所有命令行并运行 PowerShell 并键入命令出现如下类似内容则表示安装成功

PowerShell
node -v
# v14.5.0
npm -v
# 6.14.7
yarn -v
# 1.22.4

配置包管理镜像(中国大陆地区)#

PowerShell
# npm
npm config set registry https://registry.npm.taobao.org
# yarn
yarn config set registry https://registry.npm.taobao.org/
Last updated on by Yan Lee