DenoDDeno
Powered by
IdeasAndActionI
Denoβ€’2y agoβ€’
3 replies
IdeasAndAction

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.
parse - @std/yaml - JSR
@std/yaml on JSR: Parsing and serializing of YAML files
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,944Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

error: Relative import path "@std/http/file-server" not prefixed with / or ./ or ../
lielmusLlielmus / help
14mo ago
Relative import path "ioredis" not prefixed with / or ./ or ../
bajosiBbajosi / help
3y ago
VIM - ALE - import-prefix-missing: Relative import path
darkelfDdarkelf / help
16mo ago