Deno

D

Deno

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

Join

rl.prompt issue

when i use rl.prompt program freezes. how can i solve?...

Zed Deno Support

How well is Deno supported in Zed? I have installed the extension but I'm still getting errors.
No description

Cannot import when index.d.ts file

This is largely a question about node compatibility as what I really want is to run my existing large node/typescript project in Deno so that I can get good jupyter integration. I've managed to figure things out to where they mostly work but am running into issues where my existing code uses the npm type-fest package to provide advanced typescript types. So as an example, I have the following import in my code ``` import { LiteralUnion } from 'type-fest'...

SIGSEGV (invalid memory reference) after returning a freshly-compiled function

Hi all, apologies if this is not the right place to ask, but we're hitting an invalid memory reference error when using deno_core and would like to ask for help narrowing the problem down or even identifying the cause of the error. Here's a bit more context: we're using the deno_core crate to write a transpiler/interpreter[1] for the Nix language[2]....

Possible to use Deno.test for callbacks?

I've been implementing tests to make sure the porting of my main project to Deno is working out as expected, coupled with this is a WebSocket server done with Deno.serve. For this the test needs to handle both a server and client session, waiting for callbacks to come through. Right now my test finishes prematurely even if I await the termination of the server, I need to set both sanitizeOps: false and sanitizeResources: false to have the test finish at all, but then it skips any assert defined in the callbacks. My previous experience is with Mocha where we get the done callback to run to finish the current test, but for Deno.test I only see us getting the option to make the test caller asynchronous, which in this case doesn't seem to help me....

Does Deno-bindgen work with Deno 2.0?

Just looking for a chatbot response. Does Deno-bindgen work with Deno 2.0?

Cannot run Nitro project

I have created a new Nitro project using deno run -A npm:giget@latest nitro nitro-app --install. It was successfull but after trying deno run dev I get an error saying: ``` error: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'pathname') at getPathname (ext:deno_node/_fs/_fs_stat.ts:177:49) at ext:deno_node/_fs/_fs_stat.ts:151:13...

jupyter / deno local import will not update

hello.. I'm using jupyter with deno kernel and am importing a local file to run in a cell. But when i update the file, the cell/notebook logs the files original message. Is there a way to force the jupyter / deno notebook to use (or reload) the new file?

Encountering error on deployment while importing files

I'm encountering an error after deploying my application to Deno using the deployctl CLI. Locally, I imported files by reading the directory with the Deno.readdir() method. I then iterated over these files to retrieve the default object each file exported, and everything worked fine. However, after deploying to Deno's cloud, I'm getting a "file not found" error. I attached screenshot of my code, my deno.json configuration file, and the error message I encountered....
No description

installing playwright in container doesn't work

Is it just me or does "deno run -A npm:playwright install" running in a Debian docker not work?

Deno v2: server & Webview

Has anyone managed to run the simple server and Webview? It is such a simple script that I can't figure out what could be going on. Any tips on how to debug it? MWE: https://github.com/webview/webview_deno/blob/main/examples/server.ts...

Deno runs the whole script instead of the method

I have following test: ``` import { expect } from "jsr:@std/expect"; import { validateInput } from "./webp.ts"; ...

winget upgrade Vs deno upgrade

I installed using winget install Denoland.Deno, I'm guessing I should upgrade using winget? Is there a difference and a preference? If so please update the GitHub readme with this 🙂

Pass JS function to an Op that can be called after the Op ends

Is there a way to have JS function to an Op that can be called after the Op ends? The problem is that to call a function, v8::HandleScope is needed but only the reference to it is passed to an op. The use case is: the op registers filesystem watcher and when change detected it should call js function that was passed as a parameter to and op. The runtime is kept running by a pending promise at another not related place....

Nodemailer fails with Client network socket disconnected before... even locally

Hey, I am trying to use nodemailer within deno (2.0.4), and I am unable to figure out why it doesn't work. I made a minimal example (ethereal credentials specifically for this example):...

I am really struggling to get Deno and a decent ORM to work.

I tried prisma multiple times by following https://www.prisma.io/docs/orm/prisma-client/deployment/edge/deploy-to-deno-deploy and https://docs.deno.com/runtime/tutorials/how_to_with_npm/prisma/ but I always get an error about the database url not starting with prisma:// I looked at denoDB but that is not mentained now. What are my options to use and connect to a sqlite db using an ORM? Thanks...

`deno task dev` not working because `--watch` doesn't detect changes

I've run deno task dev on a new project from deno init and so it should be running the task deno run --watch main.ts . But when I change main.ts the command does not re-run. The output remains statically: ```sh deno task dev Watcher File change detected! Restarting!...

Weird Deno Type Safety

Im developing a discord bot with deno in ts, and the type safety for the discordjs package just seems to go stupid mode if I wait long enough and starts to say stuff like in first image, but if I reload it its fine. Its not like the code doesnt work or anything, deno just starts to freak out for some reason and its really annoying because I have to reload the project every time it does, does anyone have any ideas?
No description

Creating nestjs app

Hello, i am trying to create a nestjs app, but getting the following error: ``` deno run -A npm:nest@latest error: Failed resolving binary export. '/Users/[username]/Library/Caches/deno/npm/registry.npmjs.org/nest/0.1.6/package.json' did not have a bin property...

Node.JS project to import Deno project in a workspace

how can I make a workspace, where one package is in Deno, and the other is in Node.JS and pnpm, and I import the Deno one from the PNPM package?