π
π7mo 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 Helper7mo 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
razzi7mo 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";
π
π7mo ago
When I over it, maybe it's not a big deal?
No description
π
π7mo ago
My script runs poperly
π
π7mo ago
No description
π
π7mo ago
I just found weird the red waves Thanks for taking the time to answer
More Posts
How to format on save with devcontainerI'd like to automatically format my code when saving, but it's not working. devcontainer.json ```jsHow does form submission work?I'm following the tutorial: https://fresh.deno.dev/docs/getting-started/form-submissions It says: >Won't install `npm:@supabase/ssr`I'm trying to build something with Fresh and Supabase and would like to use the [`@supabase/ssr`](ht`RangeError: Offset is outside the bounds of the DataView` when trying to encrypt with AES-CRTHi, I'm trying to encrypt some files with aes128-crt, but I always get the error below. (Even if I jAny way for VS Code to auto-complete library subdirectory in import?Is there any way for VS Code to suggest subdirectory in a package (especially for npm package) when get hours & minutes in a specific timezoneMaybe I search the wrong way, but all I'd like to do is to use a specific timezone in my project runConnection refused when creating a local API serverI'm following [Simple API server | Deno Docs](https://docs.deno.com/deploy/tutorials/simple-api "Simdeno deploy queuesis there a special flag or setting required for queues in deno deploy , i ceated a very simple exampWhat is the difference between importing "preact" via esm.sh or npm:...?What is the difference between importing "preact" via esm.sh or npm:...? "preact": "https://esm.sh/pDeployctl, error: Uncaught (in promise) NotFound: Failed to spawn 'start': program not found```powershell > deployctl logs a i Provisioning a new access token... i Authorization URL: https://d