Deno

D

Deno

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

Join

deno install not working on latest canary

mac version: Apple M1 Pro deno version: deno 2.0.0-rc.1+f0a3d20 ```console moonrepoV3 git:(main) ✗ deno upgrade --canary ...

How to only load worker once

I have a file that initialises a worker, and exports a function that posts a message to that worker. But if I import that function into multiple other files, the worker gets loaded each time. How can I prevent this to ensure only one instance of the worker is loaded, regardless of how many files I use the function in?

Routes with Deno and Fresh

For web application using deno and fresh, what is recommended to serve backend api? Deno serve or fresh? What are the key trade-offs between Deno's serve and Fresh in terms of Performance & Scalability?

Deno and Testcontainers

I would like to instantiate a postgresql container using testcontainer once before running all test. How can I do it using deno testing ?? There is a similar funcionality in vitest: https://vitest.dev/config/#globalsetup...

Deno and NestJs

When trying to run the build of a NestJS application I get this error ```[sheik@archlinux dist]$ deno --version deno 1.46.3 (stable, release, x86_64-unknown-linux-gnu) v8 12.9.202.5-rusty...

rusty_v8, how to mutate scope outside anonymous function

Hi, I'm trying to use the v8 rust create to run javascript on my backend and now I'm stuck at how to modify a Vec<String> declared outside a anonymous function scope, as said function gets used to be the callback of a v8::Function. ```rust let logs = Vec::new(); ...

already borrowed: BorrowMutError in deno runtime

/Users/louisbeaumont/.cargo/registry/src/index.crates.io-6f17d22bba15001f/deno_core-0.283.0/runtime/op_driver/futures_unordered_driver.rs:307:22: already borrowed: BorrowMutError this is my deno code: https://github.com/mediar-ai/screenpipe/blob/main/screenpipe-core/src/pipes.rs...

any reason against using the deps.ts approach?

It seems that the Deps.ts approach is not recommended anymore since jsr - however I fail to see why. What's the benefit of using the import map and falling back into the package.json problems instead of having a Deps.ts file? The only thing I can see is that the module specifiers can thus be compatible with non-deno code...

how to disable no-window rule

adding it to "no-window" to deno.json.lint.exclude does not work. While I can appreciate the sentiment behind this rule and using globalThis should be preferred there is apparently no way for globalThis to be extended in ambient contexts - i.e. when you're writing a library and want to attach something to globalThis without having to assert its type every time. So using window is afaik the only way to achieve this and having deno tell me "hey, window won't be available" is not helpful here... especially when I know that it will be available....

Deno install not working for any of our frontend projects - deno 2.0.0-rc.0+072bf5d

Node modules is not created when using Deno Install for my Sveltekit projects. They were working fine in prior releases but Deno Install has stopped working. After running deno install locally when I run deno run dev I get packages not found errors in all frontend projects. Blocked across all our development at the moment. Here's a link to our monorepo: https://github.com/zemili-group/moonrepoV3 ...

Enable VSCode Testing color output?

When using the Testing panel in VSCode, how can I enable color output in the Test Results terminal output? I've tried changing settings.json ```json // .vscode/settings.json {...

Userland V8 snapshots

Hello Deno community 👋, Is there any way to take a v8 snapshot of a script using Deno (similar to node's --build-snapshot). I'm interested in using deno for this because of this PR: https://github.com/denoland/deno/pull/17460 Node.js snapshots doesn't support ES modules. 🙂 My goal is to speed up my script startup time which makes heavy operations during its initialization....

Deno install npm: specificers not working at the moment.

I have tried Deno Install and have added the packages to my deno.json using deno add with the npm: prefix. ```json { "name": "@scope/opsap-data",...
No description

WritableSteam not opening.

``` constructor() { this.command = new Deno.Command(this.exec, { args: ["analysis", "-model", this.model, "-config", this.config], stdin: "piped",...

Fresh partials - navigation with icons

Hey, I'm using partials, and they work fine - as long as I use regular text in a link (<a>), but when I put SVG icon inside, the system leads me to a 404-error page. Any clue why? `<a href="/main/trening" f-partial="/partials/main/trening"> click me </a>...

S is Not Async Iterable

Hello, I just started using deno and I don't understand what's wrong with my code. I'm trying to make a simple program but it gives me an error can someone help?
No description

dwm hot reload

looking to hot reload dwm canvas when I update / save the file instead of having to restart the program

Deno memory usage in Docker Container is crazy high...?

When I run Deno in Docker, Docker Desktop stats say it's using 144mb of memory, and NodeJS uses 11mb... Is this right?!?!? docker run -it --rm --name deno-process denoland/deno:alpine deno...

How to resolve an import statement in Deno

Hi, I am testing out Deno, but cannot get it to resolve imports. For example, how would I get Deno to resolve this import statement... import { readFileTxt } from '@root/db_fs/src/utilReadFiles'; ...