Deno

D

Deno

Chat about Deno, a modern runtime for JavaScript and TypeScript.

Join

Error while using discord.js with deno

Hi, I encountered a problem with my discord bot. It stops after many hours with such error: ```cmd /root/.pm2/logs/index-error.log last 15 lines: 11|index | Download https://jsr.io/@std/datetime/0.225.2/_date_time_formatter.ts 11|index | Download https://jsr.io/@std/dotenv/0.225.2/mod.ts...

Add provider component to context

Hi, is this an anti-pattern in Fresh? ```tsx export default function App({ Component, SomeProvider }: PageProps) { return (...

[SOLVED] dlopen failing

When I try to use Deno.dlopen() like this:
Deno.dlopen("./SDL2.dll", {} as const);
Deno.dlopen("./SDL2.dll", {} as const);
I get the following error:...

i trying to deploy deno2 . it fails

first deno.lock version is 4 but editor says it must be v3. after i change v4 to v3 it says deno.exit is not allowed...

Deno + Hono + React. Any example or tutorial?

I see on deno docs site only tutorial how to create react app using deno and oak. How about hono instead of oak? Is there any example or tutorial?...

Deno v2 RC not deploying properly?

I have a pretty basic deno v2 app with a simple endpoint - when I deno install, it automatically adds the deno lock version as "4". To deploy successfully I have to manually downgrade it to "3" for it to work. Then, when I hit my 1 endpoint, it say's it's not able to find one of my deps which is pdf-parse ...

import

i keep experiencing LSP meltdowns where random imports just stop being understood at random points in development and the only way to fix it is restarting extension hosts. sometimes that won't work either and i'll have to do a full IDE restart. zero runtime issues. initially the issue was happening with discordjs randomly, now it's happening with standard libs too. nothing special in project configuration just deno init and got to work, here's my deno.json: ```json { "tasks": {...
No description

[Solved] How to use precompile TSX transform

Hi! I'm trying to use https://deno.com/blog/v1.38#fastest-jsx-transform . Configured everything and it works. However, I don't understand how to properly do rendering before sending result to the client. Currently I'm doing ``` import { render } from 'npm:preact-render-to-string'...

Deno fmt force `njk` content type for `.liquid` files

With the arrival of support for formatting Nunjucks in Deno 2, I would like to use this functionality to format .liquid files (which are very similar in syntax). However, I'm struggling to get the --ext flag to work properly. It doesn't seem to recognize njk as a possible value for --ext, but even if I use a recognized value, it says the target file is not found even though it exists. Note that it does work if my file has a .njk extension. ```
cat test.liquid
<body>...</body> ...

How to use ErrorBoundary

I just looked fresh really amazing but didn't get any feature like error Boundary. Like sveltekit, next and remix has. Is there anything like that in fresh if its hiding from my sight

VSCode JavaScript Debug Terminal

In some projects we have lots of cli scripts we run. Setting up vscode tasks for each one is a bit annoying. Is there anyway to take advantage of the JavaScript Debug Terminal in VS Code?...

Deno 2.0 TS errors on fresh project

I created a new project with Deno 2 using deno init test-proj Immediately, I have Typescript errors I'm not sure how to fix. Property 'main' does not exist on type 'ImportMeta'.ts(2339)...
No description

No Auto Complete Suggestions for `@/` Alias in Deno with VSCode

Hi,
I’m using Deno with VSCode, and the @/ alias works fine for imports but I don’t get auto complete suggestions for files in my src/ folder. I have to manually type the file paths for it to work. For example this works: ...

INTERNAL_SERVER_ERROR_3

I occasionally get this error, and I suspect it has something to do with getting lots of traffic:
Internal Server Error (INTERNAL_SERVER_ERROR_3) An error has occurred inside of a Deno Deploy system
My website is https://wordcel.org, and you can probably replicate the issue if you visit this page and just keep clicking random answers for a while:...

deno gives 401 unauthorized for imports with an `npm:` specifier, but npm, yarn and pnpm all work?

heya! i'm having difficulty with getting npm: specifiers to work. i've tried them via an import like below, or running via the cli. both give a 401 error for any package (regardless of if it's scoped, unscoped, using a specific npm config registry or anything). i tried this in all of stable, canary and rc deno versions - all have the same. i'll include debug logs from the latest rc ...

I would like to integrate Cloudflare DDOS attack prevention into Deno Deploy

How can Cloudflare's anti-DDOS system be integrated into Deno Deploy?

TypeError: error sending request for URL! (Deno -Supabase - Oak)

Hi team, I am struggling to use Deno with oak for my project and have this issue: ``` Error : 500 Internal Server Error! {...
No description

Is DENO v2.0 RC installable from homebrew? Or upgradeable from 1.46-> 2.0 with brew upgrade?

Is DENO v2.0 RC installable from homebrew? Or upgradeable from 1.46-> 2.0 with brew upgrade?

Format with Deno language server ignores fmt settings

I have added these settings in deno.json: ```json "fmt": { "lineWidth": 80, "indentWidth": 4...

Iterator is not defined when creating a snapshot with init_ops_and_esm

I've been following the roll your own runtime blog post series to make a simple CLI powered by deno_core. It's worked great, but I'm having trouble on part 3: setting up snapshots. My runtime.js file is just this: ```js class StdinIterator extends Iterator { next() {...