相关文章推荐
火爆的山楂  ·  demo_百度百科·  5 月前    · 
On this page

Installation

Deno works on macOS, Linux, and Windows. Deno is a single binary executable. It has no external dependencies. On macOS, both M1 (arm64) and Intel (x64) executables are provided. On Linux and Windows, only x64 is supported.

Download and install Jump to heading

deno_install provides convenience scripts to download and install the binary.

Using Shell:

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

The startup time of the Deno command gets affected if it's installed via npm. We recommend the shell install script for better performance.

Using Homebrew:

brew install deno
asdf plugin add deno https://github.com/asdf-community/asdf-deno.git
# Download and install the latest version of Deno
asdf install deno latest
# To set as the default version of Deno globally
asdf set -u deno latest
# To set as the default version of Deno locally (current project only)
asdf set deno latest

The startup time of the Deno command gets affected if it's installed via npm. We recommend the PowerShell install script for better performance.

Using Scoop:

scoop install deno

The startup time of the Deno command gets affected if it's installed via npm. We recommend the shell install script for better performance.

Using Nix:

nix-shell -p deno
asdf plugin add deno https://github.com/asdf-community/asdf-deno.git
# Download and install the latest version of Deno
asdf install deno latest
# To set as the default version of Deno globally
asdf set -u deno latest
# To set as the default version of Deno locally (current project only)
asdf set deno latest
    

Deno binaries can also be installed manually, by downloading a zip file at github.com/denoland/deno/releases. These packages contain just a single executable file. You will have to set the executable bit on macOS and Linux.

Docker Jump to heading

For more information and instructions on the official Docker images: https://github.com/denoland/deno_docker

Testing your installation Jump to heading

To test your installation, run deno --version. If this prints the Deno version to the console the installation was successful.

Use deno help to see help text documenting Deno's flags and usage. Get a detailed guide on the CLI here.

Updating Jump to heading

To update a previously installed version of Deno, you can run:

deno upgrade
    

This will fetch the latest release from github.com/denoland/deno/releases, unzip it, and replace your current executable with it.

You can also use this utility to install a specific version of Deno:

deno upgrade --version 1.0.1