block_hacks
block_hacks12mo ago

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

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
1 Reply
javi
javi12mo ago
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.