Member-only story
Deno 1.28: “Houston, we’ve got NPM compatibility!”
Big news out of Deno.land today — 1.3 million new modules are available in Deno
I had initially been working on an article to publish today on the Deno full stack framework, Aleph.js — but it will have to wait. I woke up to quite a bit of exciting news that had me fall out of my desk chair. I got my first offered my first real web developer job today, but thats not what made fall out of my chair.
Deno 1.28 came out and it features the stabilization of npm compatibility. Let that sink in — you can now import npm modules safely and use them in production. YOU CAN NOW USE PRISMA, MONGOOSE, REACT, VUE, CFB.JS, OMG EVERYTHING!!!!
Alright, I’m calm now. Let’s get down to business with the new stuff. First things first — install or upgrade your version of Deno before we get going:
deno upgrade
# If you are installing Deno for the first time
# MacOS and Linux
curl -fsSL https://deno.land/install.sh | sh
# Windows
irm https://deno.land/install.ps1 | iex
Using NPM in Deno
Now, its not like you are going to be able to use npm install — and this is great. Just follow along to see why. Let’s start out by importing a statement:
import { alpinejs } from "npm:alpinejs@3";
# You can also map a bare specifier…