DEV Community

Cover image for Deno Version Management
Thomas Alcala Schneider
Thomas Alcala Schneider

Posted on

2 3

Deno Version Management

Logo © Samip Poudel

Deno is really nice! Version managers are nice too, they offer a way to have several versions of a runtime, dependencies installed at a user level, without breaking system runtime if any.

Here we will use one version manager to install the Deno runtime 😀.

Lexicon

Deno

Deno is a JavaScript/TypeScript runtime that can replace NodeJS, with
the aim to be more secure.

Deno Runtime Installation

Standard Installation

There are a bunch of scripts to install the Deno runtime in the
official
documentation
,
depending on your operating system. Deno is written in Rust, so you can
also install it with cargo, the Rust package manager.

dvm

The real topic of this post!

dvm (Deno Version Manager) is a version manager inspired by
fnm, a fast NodeJS version manager.

Installation

You can get it from the GitHub release
page
or with opam if you work
with OCaml, it is written in OCaml.

$ opam pin add dvm https://github.com/imbsky/dvm.git 
$ opam install dvm

For Windows, your best bet is probably the OPAM approach, or WSL.

Initialization

It is not as mature as fnm, so what you have to do next is:

  1. Install a Deno runtime

    $ dvm install 1.1.3

  2. Use the Deno runtime

    $ dvm use 1.1.3

  3. Add the Deno runtime to your PATH

    Add this line to your shell rc: export PATH="$HOME/.dvm/current:$PATH"

Test the Runtime

Deno hosts an example file with a single line console log in it. You can
test your runtime with it like this:

$ deno run https://deno.land/std/examples/welcome.ts  
Enter fullscreen mode Exit fullscreen mode

This is it! 🎊

Postgres on Neon - Get the Free Plan

No credit card required. The database you love, on a serverless platform designed to help you build faster.

Get Postgres on Neon

Top comments (0)

Billboard image

Get alerted faster with Checkly

Join Vercel, Render, LinkedIn, and thousands of other teams that rely on Checkly to keep their websites and applications running smoothly with proactive monitoring, instant alerts, and comprehensive full-stack tracing.

Start Monitoring

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay