IdeasAndAction
IdeasAndAction
DDeno
Created by IdeasAndAction on 8/26/2024 in #help
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
import { parse } from "@std/yaml/parse";
import { assertEquals } from "@std/assert";

const data = parse(`
id: 1
name: Alice
`);

assertEquals(data, { id: 1, name: "Alice" });
import { parse } from "@std/yaml/parse";
import { assertEquals } from "@std/assert";

const data = parse(`
id: 1
name: Alice
`);

assertEquals(data, { id: 1, name: "Alice" });
When I run it, I get a relative path error:
$ deno run main.js
error: Relative import path "@std/assert" not prefixed with / or ./ or ../
$ deno run main.js
error: Relative import path "@std/assert" not prefixed with / or ./ or ../
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.
4 replies