Deno

D

Deno

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

Join

How to wait for page/iframe to load completely using Astral

EDIT: I think what I am looking for is How to wait for an iframe to load. I most recently tried using await page.waitForSelector('#duo_iframe') to wait for the ID of the iframe but this failed and timed out. --- I am using Astral instead of playwright or puppeteer which I would normally use with Node and Astral is very similar to playwright but I can't get it to properly wait for my page to load for all the content....

Workspace member parallel processes (monorepo)

In the Node based monorepo tools I have used, when you run a "task" at the root of the workspace, it will run that same "task" in each workspace in parallel For example, I can run "deno task dev" at the root of the repository and it will run "dev" in each workspace member as a way to spin up each of the services I am working on in one command Is this something that is built into Deno Workspace?...

DenoKV - Missing DENO_KV_ACCESS_TOKEN environment

Learn more at: https://docs.deno.com/runtime/manual/tools/unstable_flags
error: Uncaught (in promise) NotFound: Missing DENO_KV_ACCESS_TOKEN environment variable. Please set it to your access token from https://dash.deno.com/account.: environment variable not found
const kv = await Deno.openKv(kvUrl)
Learn more at: https://docs.deno.com/runtime/manual/tools/unstable_flags
error: Uncaught (in promise) NotFound: Missing DENO_KV_ACCESS_TOKEN environment variable. Please set it to your access token from https://dash.deno.com/account.: environment variable not found
const kv = await Deno.openKv(kvUrl)
...
No description

Can't install Deno on Windows

I'm trying to install deno using PowerShell using the command provided in the Deno installation guide (irm https://deno.land/install.ps1 | iex). However, when I run this command, I get the following error: ```cmd Remove-Item : Cannot find path 'C:\Users\piotr.deno\bin\deno.zip' because it does not exist. At line:39 char:1 + Remove-Item $DenoZip...

Rust GUI app: embedded deno runtime and custom JSX/TSX compiler

Hi! I am building a Rust GUI and I want to use embedded Deno to build a plugin system. I want to use something like either: - https://www.npmjs.com/package/react-reconciler - https://github.com/solidjs/solid/blob/main/packages/solid/universal/README.md ...

Handle routes for multiple domains using Fresh and Deno

How should we maintain multiple routes of multiple sub domains using fresh and deno? As per documentation we need to add all our routes inside routes folder. but what if we want to maintain routes per domain per feature? Is it possible?

unsupported lockfile

in my gh action setup deno env using rc 2: ```yml - name: Setup Deno environment uses: denoland/setup-deno@v1 with:...

recommended way to get file checksum

Hi, I am creating an application that needs to get checksums for files. The code currently looks like this: ```ts import * as node_crypto from 'node:crypto' async function get_checksum() {...

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 {...
Next