安装 Deno

使用以下任意命令在你的系统上安装 Deno 运行时。Deno 提供多种安装方式,完整的安装选项列表可查阅官方安装文档

Shell(macOS / Linux)

sh
curl -fsSL https://deno.land/install.sh | sh

PowerShell(Windows)

powershell
irm https://deno.land/install.ps1 | iex

包管理器

如果你偏好通过系统包管理器安装,也可以使用以下方式:

Homebrew(macOS)

sh
brew install deno

Chocolatey(Windows)

powershell
choco install deno

WinGet(Windows)

powershell
winget install --id=DenoLand.Deno

Scoop(Windows)

powershell
scoop install main/deno

验证安装

安装完成后,运行以下命令查看 Deno 与内置的 TypeScript、V8 引擎版本:

sh
deno --version
提示
在 CI 或容器环境中,推荐使用官方提供的安装脚本,或通过GitHub Releases下载对应平台的二进制文件以获得可复现的版本。

从源码构建

如需从源码自行构建 Deno,请参考仓库中的贡献指南,其中包含了完整的构建说明。