Deno

D

Deno

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

Join

FileServer from tutorial, 2000+ ms to connect?

Hello! I used this guide as an example, and made a small file server. ```typescript export interface IHttpServerOptions { name: string port: number...
No description

How to import relative JSR module from import map

Problem I expect the following to work, but it does not: ```json5...

Adding JSR packages to vite example `tutorial-with-react`

I am trying to work out how to start using deno instead of pnpm for a web react/vite/ts project I have. I cloned tutorial-with-react to test. I am using 2.1.1. I wanted to add a package from the jsr (@std/collections) and use that in the tsx pages. Naively, I just did a deno add jsr:@std/collections and then tried to reference it with import { pick } from "@std/collections";. Somehow this isn't showing an error in vscode but if I run with deno task dev then I get the following error: ``` 6:43:40 PM [vite] Internal server error: Failed to resolve import "@std/collections" from "src/pages/Dinosaur.tsx". Does the file exist? Plugin: vite:import-analysis...

Deno2: Websocket send not flushed until another message is received

I'm seeing behavior similar to this in Deno 2.1.1 https://github.com/denoland/deno/issues/18700 As far as I know I'm doing nothing special at all, just using the standard Deno websockets. I don't see any way to flush them based on the current implementation, and this bug suggests it was fixed. Here's my code for creating the websocket: ``` ...

How to add a simple live reload?

Consider this super simple codebase ```ts app/ index.html...

Convert npx commands to deno

Hi, I was wondering how to use deno with these commands
No description

Debugger crashes in Docker container

I get this error message trying to debug a simple Deno + hono project: ``` deno_1 | ============================================================ deno_1 | Deno has panicked. This is a bug in Deno. Please report this...

Deactivate Deno TypeScript LSP in Visual Studio Code

I want to use Deno for Linting in a Node.js project but get deno-ts TypeScript errors, is there a way to disable the typescript deno LSP?

Failed deployment Deno Deploy

Hey guys ! First of all I'm very new to Deno and trying out the whole toolchain because it seems so promising. I'm actually trying do deploy a small app using Deno Deploy but I'm stuck with this error : ReferenceError: process is not defined I'm not even using an npm package. ...
No description

where does `deno compile` place the V8 code cache?

In Deno 2.1 it was added a V8 code caching for faster startups when running a binary produced with deno compile. I have a setup where I use deno compile with Docker to have a minimal alpine image that just runs the compiled binary in the end. How could I make sure to get this cache created at the inital run of the binary to improve the startup time of the Docker container? I'm thinking that using a multi stage Dockerfile where I build and run the deno compiled binary and then copy that and the V8 code cache over to a bare alpine image would give me the best startup time. So basically, where is this V8 code cache stored?...
No description

Tailwind V4 Beta 1

The same works in Tailwind V3, but here it produces 22KB of unrelated styles. ``` import postcss from "npm:postcss"; import tailwindcss from "npm:@tailwindcss/postcss@next";...

cant connect to mongo atlas via official driver or mongoose but works outside of deno

i tried to connect to atlas through the connection string provided by them and the default example code, it works perfectly fine using node, but when i use deno the connection times out and i cannot connet using either libraries to atlas, i have gone through countless github issues mentioning the same problem but none provided a clear solution, even though each and every issue ended up with saying that the problem has been fixed in a certain update, iam on the latest version of deno, mongodb/mon...

IntelliSense doesn't work with npm:minio@8.0.2

Looking for help if someone have solved this already. I have the following deno.json: ```json...

Sharing a library between deno and frontend

Hey all, I've got a Deno server/api application setup, and now that I'm going to build the frontend, it'd be nice to split out a common library for the 2 projects to share, does anyone have any recomendations on how to do this? I'm trying to keep dependencies minimal, so I'd prefer to not have to add anything outside deno, and maybe Vite for the frontend app. Any help would be appreciated!...

Transitive dependency module not found?

I am using Deno 2. When I use this import: import { plainToClass } from "https://deno.land/x/class_transformer/mod.ts" and run my project, I get this error:...

deno run fail to execute npm binary file in 2.0

Describe the bug Hi there, Andrew from supabase, we've been having report of users failing to use supabase CLI with Deno 2 and running into some error executing the compiled binary. To Reproduce Steps to reproduce the behavior:...

Converting package.json into deno.json

Is there any documentation about what properties deno.json have and what are the expected values? I'm unable to find any. I would like to put as many things as possible into deno.lock from the package.json. This would be really helpful....

How to install npm dev dependencies?

I try to install keysely-codegen using deno add -D npm:kysely-codegen but everytime it adds the dependency to my regular imports in the deno.json, which looks like this: ```javascript { "nodeModulesDir": "auto",...

deno lint doesn't notice function call to unimported function

if I put "foo()" into test.js and run "deno lint test.js" I was expecting it to say "function foo() is not defined" or similar??
No description

Dynamic KV queue listener removal

It is possible to add listeners dynamically, but it seems impossible to remove them. I am creating listeners dynamically to process incoming messages from incoming WebSocket events. Each WebSocket client has an ID, and I want to create a queue dynamically for each ID when it connects, then process items in each queue sequentially to avoid concurrency issues arising from multiple rapid messages being received from the same client. However, if the connection is lost, I will need to create a new listener with a new WebSocket instance, so it can continue to process messages on the new connection. ...