Deno on Windows: Installation
Windows desktops/laptops are still very popular when compared to Apple desktops/laptops. The primary reasons that still work for Windows are: less cost, wide variety of software packages, drivers, etc. As per Wiki data, Windows PCs still enjoy a 75% market share.
For desktop and laptop computers, Windows is the most used at 75%, followed by Apple’s macOS at 16%, and Linux-based operating systems, including Google’s Chrome OS, at 5% (thereof “desktop Linux” at 2.35%). With tablets, Apple’s iOS has 55% and Android has 45%.
Considering the popularity of Windows PCs, we’ll dedicate a series of articles on using Deno on Windows. In this article, i.e. the first article in the series, we’ll go over installation of Deno on Windows 11.
Let’s get started.
Installation of Deno on Windows
The installation of Deno on Windows isn’t as easy as installation on Mac or Linux. In other words, installation of Deno on Windows is a bit more than running a simple command on a terminal.
As per Deno’s installation instructions, there are three ways to install Deno on Windows:
The easiest way is to install with minimal third-party software programs is to use PowerShell. Also, it’s possible that PowerShell would already be there on the PC. In that case, there is no need to install anything additional.
Let’s go over the steps in detail.
The first step is to install PowerShell on the Windows PC. Here are the steps along with screenshots.
- Open this link in the browser
- Choose MSI package installer (this is for everyday user)
- Download the MSI installer
- Open the downloaded installer & follow the steps
Once PowerShell is successfully installed, open a terminal and run pwsh.exe:
The pwsh.exe file is the PowerShell executable. It takes us into the PowerShell environment.
iwr https://deno.land/x/install/install.ps1 -useb | iex
The Deno gets installed successfully. The default installation location is .deno/bin in user’s home directory. Once Deno is installed, we can quit the PowerShell and use Deno in a normal terminal. The path to Deno’s installed executable also gets added to the PATH environment variable:
After installing Deno, quit PowerShell, close and re-open a terminal. Closing and reopening the terminal ensures that the new PATH takes effect.
- We can check Deno’s installed version using deno -V
- We can start REPL using deno command (without any subcommands)
- We can run a fetch request in the REPL
- We can run a quick eval
That’s all about installing Deno on Windows. In the next article, we’ll run a small HTTP server and a file server on Windows.
This story is a part of the exclusive medium publication on Deno: Deno World.