D
Deno

help

Whimsical error shows up when I run a file

KKRusl11/7/2023
I'm trying to make a discord bot with Deno and d.js but for some reasons I get this error
error: Relative import path "@discordjs/util" not prefixed with / or ./ or ../
at file:///C:/Users/andri/AppData/Local/deno/npm/registry.npmjs.org/@discordjs/builders/1.6.5/dist/index.d.ts:4:42
error: Relative import path "@discordjs/util" not prefixed with / or ./ or ../
at file:///C:/Users/andri/AppData/Local/deno/npm/registry.npmjs.org/@discordjs/builders/1.6.5/dist/index.d.ts:4:42
DAHDeno AI Helper11/7/2023
The error message you're seeing is related to the way Deno handles module imports. According to the documentation, Deno does not support bare specifiers like @discordjs/util. Instead, you should use a full URL or a relative path. In your case, it seems like the @discordjs/builders package is trying to import the @discordjs/util package using a bare specifier, which is not supported in Deno. If you're using code both with Deno and Node.js, the node: scheme will work in both runtimes and it’s recommended to update to them for your Node.js code. However, this might not be applicable in your case if the discord.js library does not support Deno. You might want to check if there's a version of the discord.js library that's compatible with Deno, or consider using a different library that is compatible with Deno. 🦕
KKRusl11/7/2023
Alright, what should I do then?
DAHDeno AI Helper11/7/2023
🦕💚 I'm glad I was able to help!
KKRusl11/7/2023
TooFunny
TTJBlackman11/7/2023
For npm imports, I think you need to prefix with npm: so it would look like import {things} from "npm:@discordjs/util"
KKRusl11/7/2023
BRO
KKRusl11/7/2023
No description
KKRusl11/7/2023
WTF vs code made a genious move that's so stupid issue is gone after i fixed it thank you for response anyway
TTJBlackman11/7/2023
lol - if it's hosted on NPM, use the npm: prefix. Auto-complete, intellisense, and chatbots are great, trust but always verify.
Lleemlwando1/13/2024
Hi team; how do i enable intellisence for npm module sub directories. I have a npm module and i want to be able to access sub folders within that module e.g "npm:myMod/sub/file.ts"

Looking for more? Join the community!

Recommended Posts
I cannot able to install itwhen i run ```sh irm https://deno.land/install.ps1 | iex ``` i got this error messageDeno lint custom rulesHey is there currently a way to create custom rules for Deno lint? And if so how can I specify a cususing OpenAI npm in Deno deploy playground:i don't know how to return the resualt , now this just return [object Object] i don't how to use asFrontend & Backend in one Deno Deploy projectI have a Nuxt 3 frontend and an Oak backend. Is it technically possible to deploy both in one deno dIs there a split_to_array function like join_to_stringI need to split a string with some delimiter `=[, ` and ask my self if there is something in deno whHow to set proxy to overall all requests coming from application?In Node JS, we can `import https` and set `https.proxy = "proxyDetails` However, I couldn't find a wOverload not typing object literalsshouldn’t only “real” show up as a property here? if not, how could I achieve that?Making Post Request To HubSpot ApiHi there I'm trying to make a post request to the HubSpot Api. However the request results in a "HubCLI prompt consistent with Deno CLII want to make outputs of my CLI tools look consistent with Deno CLI. Is there a rust crate to do thcannot set property on fetch responsein the browser this works ```javascript let o = await fetch('https://deno.com'); o.asdf = 2 console.Component testing with DenoI've run through a zillion possible setups with Deno and I'm still struggling to understand exactly Is there any way to run deno as a cluster on one machine? (like pm2)I plan to service with deno, but PM2 does NOT support deno. Is there any way to run deno as a clusthow to set remoteAddr from http header Forwarded for or X-Forwarded forIn some environments are the TCP Client IP not the real Client IP. What's the best way to set https:FFI: How to pass a pointer to a char pointer?How can I pass a pointer to a char pointer in order to use the C function below via FFI? ```c my_funDeno.serve().shutdown doesn't exist?```ts const server = Deno.serve({ hostname, port, }) server.shutdown() ``` ``` error: TS2339 [EDeno deploy see errorHow can i see the error why my build failed? It just returned `Error An internal server error occurrIn-browser testingI need to run some tests in a browser (Chrome, Firefox, Safari). Either by running a full test suiteCannot pass request object to workerI am trying to pass a request object to a worker file, but it is not receiving it inside of the workDoes the picture plugin for lume work with remote Images?I want to use the picture plugin with images that are from a remote location. Is there a way to get problem with prompt on windowsHi, I'm experiencing trouble when inputting 2 char long strings in prompt, it's doing \r