2025/06/30

Deno 安裝篇

作者:吳祐賓 

 

 


 

安裝


Deno 能夠在 macOS、Linux 和 Windows 上運行。Deno 是一個單獨的可執行檔案,它沒有額外的依賴。 

 

下載

官方推薦使用指令碼操作

 

使用 Shell (macOS 和 Linux):


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

使用 PowerShell (Windows):


iwr https://deno.land/x/install/install.ps1 -useb | iex 


 

手動安裝

Deno 也可以手動安裝,只需從 github.com/denoland/deno/releases 下載一個 zip 檔案。它僅包含一個單獨的可執行檔案。在 macOS 和 Linux 上,您需要為它設定執行權限。 

 


 

手動安裝後設定環境變數

如果你不想每次開機都自動常駐,也可以在需要使用 Deno 時,使用指令將 Deno 執行檔所在路徑加入環境變數:

 

# Dos command 

SET PATH=%PATH%;D:\deno

# PowerShell

$env:path+=";D:\deno"

 

 


沒有留言:

張貼留言