Deno

D

Deno

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

Join

Importing Buffer Type

Hi there, I am having issue typing a hash. I am trying to create an encryption key and signature key, but don't know what the return types should be in Deno. In node.js, the type appears to be Buffer, but this comes up with an error in Deno. Here's the code I'm referring to: ```ts class myClass { _encryptionKey: Buffer; // Errors: Cannot find name 'Buffer'.deno-ts(2580)...

finding unused exports

is there a way that works with deno to find unused exports in my project?

Capturing network requests using Puppeteer?

I want to capture any requests, which include .m3u8 in their URL, but its neither captured by the normal requestInterception nor using the createCDPSession method. In the normal chrome devtools, the master.m3u8 shows up, but my program cant catch it for some reason. I also tried using Astral, but the it also didn't capture the request. ``` Puppeteer version: 16.2.0 (latest) Deno version:...
No description

Deno.UnsafeCallback Error (bypass string from c++ to deno)

I want to get string from c++. (c++ -> deno works fine.) I got error like this. in bellow code. ...

Serving a deno vite-bundled react app with router

Hey all, I've been testing using vite with deno and it's been working quite nicely. Although all the examples throw it into a simple file server which doesn't really work when you've got routing done in the react app. From the docs: https://docs.deno.com/deploy/tutorials/vite I tried exploring using Hono to serve it after build, but I can only seem to get it to work if I manually set the rewrite paths. Was curious if anyone had any luck or a nice way of handling this?...

could not find "deno.json" after compile

I tried to use deno compile to create a binary with mixed results. Using ```ps deno compile -A main.ts...

websockets package

an npm package using websockets I use fails ```deno run --allow-all cli.ts error: Uncaught (in promise) TypeError: (0 , G.default) is not a function at https://esm.sh/v135/rpc-websockets@7.9.0/denonext/dist/lib/client.js:17:1461 at https://esm.sh/v135/rpc-websockets@7.9.0/denonext/dist/lib/client.js:17:1583...

Good Back-end Framework?

Hi 👋 I'm looking for a back-end framework to use in my Deno project. I have tested a few, like Oak, Abc, and Hono. This is what I'm looking for:...

deno notebook can't import skia_canvas

It seems that --unstable-ffi is required, but I have no idea how to make the deno jupyter kernel use that flag.

Windows compile

not sure how to debug this output isnt clear to me ```deno compile --target x86_64-pc-windows-msvc -o hello.exe main.ts -Verb RunAs Administrator Compile file:///C:/Users/Administrator/denotest/main.ts to hello.exe "C:/Users/Administrator/scoop/apps/tar/current/bin/tar.exe": Cannot connect to C: resolve failed [0m [1m [31merror [0m: Writing hello.exe ...

Deno KV: How to query for all records that have been updated since a given timestamp?

I'm evaluating Deno KV for project and looking through the API I'm unsure of how to achieve the functionality in the title. Is the answer to maintain a secondary index that has the timestamps as a part of the key and then do a list call with a range selector?

Cannot find module '@alloc/quick-lru'

I'm having this issue in my fresh project at the moment. It was working well and suddenly I have ths error.
Task start deno run -A --watch=static/,routes/ dev.ts Watcher Process started. The manifest has been generated for 4 routes and 1 islands....

Call Rust function from Deno API

I am new in deno. My question is what is the best way to call rust code in a deno api like oak? I tried it with https://napi.rs/ which did not work. Is there something similar for deno?...

Deno Oak doesnt work when compiled to `.exe`

Hi 👋 I have this example from Deno site and when compile it to .exe and run it, I get the longs in the console of the .exe. ```ts...

Incorrect 404 error when importing an explicit version of a package

Hi 👋 I get this error: "Implicitly using latest version (v1.5.2) for https://deno.land/x/cheetah/mod.ts" So, I change the import URL to this: https://deno.land/x/cheetah@1.5.2/mod.ts...

Why does `res.text()` not work inside `useEffect()`?

On islands/test.tsx I have: ```js import { useEffect } from "preact/hooks"; export default function Test(){ fetch('https://example.com')...

DNT build type check fails on std/streams/buffer byobRequest

So using dnt to build a short script which uses node's child_process and web streams I'm getting type errors on Deno's std/streams/buffer code. Specifically: ``` std@0.220.1/streams/buffer.ts:32:59 - error TS2339: Property 'view' does not exist on type 'never'. const view = new Uint8Array(controller.byobRequest!.view!.buffer); ~~~~...

deny path of website instead of whole website

Is it possible to for example deny only a path of a website instead of the whole website?

Log output from Deno.ChildProcess while its running

I want to log all output immediately when its logged in the child process. how would i do that?