jradxl
jradxl2mo ago

Deno Add syntax?

It's clear that deno add jsr:@luca/cases works. But why doesn't deno add cliffy@v1.0.0-rc.7 error: cliffy@v1.0.0-rc.7 was not found in either jsr or npm. work? Neither does, from documentation deno add @std/path @std/assert error: @std/path is missing a prefix. Did you mean deno add jsr:@std/path? Has the use of deno.land/x been removed from deno add? Or is there some other way of getting deno add to find the latest for me, automatically.
5 Replies
bartlomieju
bartlomieju2mo ago
Has the use of deno.land/x been removed from deno add?
deno.land/x was never supported in deno add subcommand.
But why doesn't deno add cliffy@v1.0.0-rc.7 error: cliffy@v1.0.0-rc.7 was not found in either jsr or npm. work?
Because such a package doesn't exist, there are some package on jsr in @cliffy scope
Or is there some other way of getting deno add to find the latest for me, automatically.
If you omit the version contrait it will work - eg. deno add @std/http
jradxl
jradxlOP2mo ago
deno add @std/http error: @std/http is missing a prefix. Did you mean deno add jsr:@std/http? I rather mucked up my example.. Was trying with Oak, which says: Deno CLI and Deno Deploy oak is available on both deno.land/x and JSR. To use from deno.land/x, import into a module: I just wanted to know what the syntax is for things that are not in jsr or npm yet
bartlomieju
bartlomieju2mo ago
Oh yeah, sorry it was supposed to be jsr:@std/http
I just wanted to know what the syntax is for things that are not in jsr or npm yet
Then there's no such syntax, it's not supported
jradxl
jradxlOP2mo ago
OK. There obviously was once, before npm: and jsr: as the documentation is littered with deno add @std/http etc Ah! I'm using Deno v2
bartlomieju
bartlomieju2mo ago
Yeah, we added a requirement for jsr: prefix a couple weeks ago. Well update docs tomorrow