D
Deno

help

Trouble with Deno imports

PPierre1/4/2024
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
DAHDeno AI Helper1/4/2024
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.
Rrazzi1/4/2024
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";
PPierre1/8/2024
When I over it, maybe it's not a big deal?
No description
PPierre1/8/2024
My script runs poperly
PPierre1/8/2024
No description
PPierre1/8/2024
I just found weird the red waves Thanks for taking the time to answer

Looking for more? Join the community!

Recommended 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://dis there a way to make the call stack in deno larger?I already think this is a no from what I have gathered but I thought Id askwhere would i go to report a minor bug in module search on deno.land ?hi, i noticed a minor bug in module search on deno.land. it's easily replicable. where would i rep@headlessui/react + FreshI'm trying to use preact/compat to leverage @headlessui/react, but running into In the `"imports"`Is there any good tools to covert npm source code to deno source package?I want to covert some old npm source package to deno source codeEnvironment Variable always returns undefinedI'm just trying to import the values from dotenv to the code, but it always returns undefined. denoUpdated examples for "Roll your own JavaScript runtime" blog posts?Hi all. I'd like to embed Deno in a project and I discovered the excellent series of "Roll your own