Deno

D

Deno

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

Join

Is assertObjectMatch too type-strict?

If you have two typed objects, actual and expect, of the same type, assertObjectMatch doesn't let you use the expect object: ```ts import { assertObjectMatch } from '@std/assert'; ...

Full-stack development based on Deno2?

Are there any good examples or open-source projects recommended for full-stack development based on Deno 2 + Vue + Vite?thanks

deno on alpine-linux

Hello, I'm trying to install deno on alpine linux installed from helper scripts (bash -c "$(wget -qO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/alpine-docker.sh)"), it says it is installed but I can't execute anything with it, any known solutions?
No description

If I dont have to explicitly install a node pacakge to use it how do I get intellisense?

For example with express, I can import express from "npm:express" but how can I get VSCode to give me some intellisense for the package?

React types without @deno-types before every import?

I'm hoping someone can clear up a little snag for me. Is it actually necessary to include // @deno-types="npm:@types/react" above every single react import in every single file? I'm up-to-date with deno, I've got npm:@types/react in my types property of my compiler options, etc. I've been perusing issues and trying alternatives for hours, but it seems like this is the only option that actually works: ```
deno --version
deno 2.1.5 (stable, release, aarch64-apple-darwin)...

how do I use `@ts-self-types` without `.d.ts` files appearing in docs?

I have this package here: https://jsr.io/@samual/duration/0.0.1-85380af Which has been uploaded as pairs of .js and .d.ts where the .js files have // @ts-self-types="…" comments at the top. And to make sure the Deno type checker can find the .d.ts files, they are all in the jsr.json's "exports" array....
No description

TestContainers are broken in Deno.

I'm was trying to set up testcontainers https://testcontainers.com/ in deno. Their SDK makes a socket connection to local docker using node http. However, this same connection is broken in deno. I'm just wondering if it's my machine or something is wrong with node:http. Here is more info https://github.com/denoland/deno/issues/27675

Super slow LSP with Deno + VSCode

We experience a really degraded DX in our IDE (VSCode) since we migrated to Deno 2.1.2. We have a Deno workspace with some backend services and a React SPA built with Vite. - Slow start (lots of "Loading...") - Blinking stuff (colors change, underlines, inferred types...) - Slow (lots of "Loading...") when we open a file for the first time....

Deno compile with SupaBase doesn't work

I created a little authentication client that works on deno very well, connecting to a supabase istance. However, when i compile the code, it doesn't work. It seems to be unable to compile Typescript into JS for some reason.
No description

Is Deno a good JS runtime for embedding into another application?

Hi, I am looking for a Js runtime that I could easily embed into my application. I would like to allow scripting for the users of my application to extend its capabilities. The reason I am considering Deno is because of its security features. Is Deno a good candidate for this?...

How to customize daisyui default theme?

Hello, I'm trying to define a new value for the light theme for daisyui. The trouble I'm running into is with the tailwind.config.ts where I'm unable to use the require statement as directed in their docs to import the existing classes: https://daisyui.com/docs/themes/#-7. Not really sure where to go from here.

I need ideas for different ways to dig into the Deno API's and its standard library

I am new-ish to Typescript, but I have been a programmer for over a decade. I'm giving myself a challenge to do a new thing with Deno every day for 100 days. https://github.com/kimdcottrell/hundo-days-of-deno Over the next few days, I'm thinking I can test out: - Deno.connect() and the node-mysql2 lib...

Relative import path "oak/router" not prefixed with / or ./ or ../ and not in import map

I get the above message when attempting to deploy to Deno Deploy via github actions. The same does not occur when running locally with deno run -A src/main.ts. deploy.yaml: ```yaml # ......

ONNX fails in Deno Deploy

Hey Deno community. We have been putting a lot of work into ONNX on Deno, a good friend put our an amazing article showing how to do it. However, we are facing trouble when trying to run it on Deno Deploy. https://blog.nima-dev.com/running-onnx-based-llm-router-in-deno-a-practical-guide-6fb7a05752fd?gi=6e297f3acd21&sk=e7199ef4cd71b1a1225a7d61a11fe9a5...

Deno + SvelteKit + Paraglide | Can not run dev server using deno because of "FsWatcher"

Hey there everyone :hooray_deno: I have been trying out Deno for my SvelteKit projects and enjoying it so far. However, I ran into an issue when using Paraglide. While running the development server, I keep encountering this error: ...

error: module 'node:fs' does not provide an export named 'globSync'

Documentation (https://docs.deno.com/api/node/fs/~/globSync) says: import { globSync } from "node:fs"; But that just doesn't work....

`npm workspace`'s support with Deno v2

I am trying to follow the tutorial of using Deno Workspaces w/ npm workspaces https://docs.deno.com/runtime/fundamentals/workspaces/#migrating-from-npm-workspaces If I copy all the code and then run deno check main.ts, I get the following error: ```...

Typescript monorepo LSP performance

I recently converted a node and typescript monorepo to deno as an experiment to try out the monorepo support in deno. To my disappointment i noticed a severe slowdown in LSP performance in vscode with the deno extension for a medium sized monorepo (~15 packages, tens of thousands of lines of code, and LSP response times went from from a barely noticeable fraction of a second to a consistent 3-5 seconds delay) This got me wondering, how does deno actually instrument the LSP for monorepos? Does it use one or several typescript projects under the hood, does it use project references? My guess would be that deno just makes one typescript project, instead of one per package in the monorepo. At least that would explain the huge difference in performance compared to using multiple node and tsc based packages with project references....

Deno + drizzleORM

Hi, i need help I have not been able to run a migration successfully, it insists that it does not find the drizzle-kit module https://github.com/edard3v/template-deno...
No description

Reliable pattern for cleaning up resources as process exists?

I'm using Explicit Resource Management (await using resource = ...), but [Symbol.asyncDispose] doesn't get called if my program is killed with SIGINT or other signals. Is there a known/good pattern for making sure some resource gets cleaned up, even if the process is dying? I'm familiar with window.onunload, but since that's a global, it feels unreliable to rely on, since anything else in my dependencies might overwrite it during a lengthy runtime. I may also have more than one thing that I want to clean up. (never mind, unload doesn't fire during SIGINT) I also know about Deno.addSignalListener() but there are an awful lot of signals I'd need to listen to....