安装 Deno
使用以下任意命令在你的系统上安装 Deno 运行时。Deno 提供多种安装方式,完整的安装选项列表可查阅官方安装文档。
Shell(macOS / Linux)
sh
curl -fsSL https://deno.land/install.sh | shPowerShell(Windows)
powershell
irm https://deno.land/install.ps1 | iex包管理器
如果你偏好通过系统包管理器安装,也可以使用以下方式:
Homebrew(macOS)
sh
brew install denoChocolatey(Windows)
powershell
choco install denoWinGet(Windows)
powershell
winget install --id=DenoLand.DenoScoop(Windows)
powershell
scoop install main/deno验证安装
安装完成后,运行以下命令查看 Deno 与内置的 TypeScript、V8 引擎版本:
sh
deno --version提示
在 CI 或容器环境中,推荐使用官方提供的安装脚本,或通过GitHub Releases下载对应平台的二进制文件以获得可复现的版本。
从源码构建
如需从源码自行构建 Deno,请参考仓库中的贡献指南,其中包含了完整的构建说明。