D
Deno

help

When I use npm: node: specifiers how can I specify the version?

Bblock_hacks7/16/2023
We know in Deno we can do import { Client, Pool } from "https://deno.land/x/pg@v0.6.1/mod.ts"; I want to use npm:axios but how can I specify the version of axios like 1.1.2
Jjavi7/16/2023
This is the npm specifiers' syntax
npm:<package-name>[@<version-requirement>][/<sub-path>]
npm:<package-name>[@<version-requirement>][/<sub-path>]
https://deno.land/manual@v1.35.1/node/npm_specifiers#npm-specifiers
Deno
npm: specifiers | Manual | Deno
Since version 1.28, Deno has native support for importing npm packages. This is done by importing using npm: specifiers.

Looking for more? Join the community!