Import from "@std/yaml/parse" or "@std/yaml" throwing relative path error.
I'm using the example on this Standard Library page: https://jsr.io/@std/yaml/doc/~/parse
When I run it, I get a relative path error:
I'd love to use the standard library the right way in the latest Deno version. I'm running Deno 1.46.1 on Ubunut 22.04.
Can't tell what I'm doing wrong. I'm copy pasting from the usage example and getting an error I don't know what to do with.
parse - @std/yaml - JSR
@std/yaml on JSR: Parsing and serializing of YAML files
2 Replies
Ah.... You have to add it via
deno add @std/yaml
first.
This is much closer to Node than I have gotten used to so far.It sounds like there are no import mappings in your
deno.json
for these two. Either add these or add the jsr:
prefix before the imports.
Or do this as an alternative: