π
π12mo ago

Trouble with Deno imports

What's wrong with my import? The link is valid and I cached it. (https://deno.land/x/deno_dom@v0.1.43)
No description
6 Replies
Deno AI Helper
Deno AI Helper12mo ago
I wasn't able to find the answer to your question in the official Deno documentation. However, based on the information you've provided, it seems like you might be missing the actual file path in your import statement. When importing from a URL in Deno, you need to specify the full path to the module file, including the file name and extension. For example, if you're trying to import a specific module from the deno_dom package, your import statement should look something like this:
import { DOMParser } from "https://deno.land/x/deno_dom@v0.1.43/deno-dom-wasm.ts";
import { DOMParser } from "https://deno.land/x/deno_dom@v0.1.43/deno-dom-wasm.ts";
Please note that the above path is just an example, and you should replace deno-dom-wasm.ts with the actual file you are trying to import from the deno_dom package. Make sure to use the correct file name and extension as per the package's documentation. This advice is not based on the Deno documentation, so I recommend double-checking the accuracy of the advice given and consulting the documentation or source repository for the deno_dom package to find the correct file path for your import.
razzi
razzi12mo ago
That appears to be missing the version, and thus returns the documentation rather than the function. Try this: import * as denoDom from "https://deno.land/x/deno_dom@v0.1.43/deno-dom-wasm.ts";
π
πOP12mo ago
When I over it, maybe it's not a big deal?
No description
π
πOP12mo ago
My script runs poperly
π
πOP12mo ago
No description
π
πOP12mo ago
I just found weird the red waves Thanks for taking the time to answer

Did you find this page helpful?