Deno

D

Deno

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

Join

How to ignore ts error when bundling?

I run
deno bundle '.main.ts' fibery.js
deno bundle '.main.ts' fibery.js
and it refuses to work due to 41 errors. Mostly they are any type error. When debugging they run fine. Is there a way to force bundling? I add the //@ts-ignore at the top of the file but it doesn't work...

Streaming FormData

I have Deno.serve a HTML page with <form enctype="multipart/form-data"> with a file input. I also have a handler for POST that would take that File, split it, and sends the chunks to another endpoint. What I have so far in the POST handler is to await request.formData() to retrieve the File from there and split....

Astro - Vs code template

I am deploying this app using the deno deploy. My app's root is available at https://antilibrary-astro.deno.dev/index.html. https://antilibrary-astro.deno.dev/ this throws the error. --- `import Layout from "../layouts/Layout.astro"; export const prerender = true; --- ...

denodrivers/sqlite and deno-sqlit behave different with multiple `?` args

I wanted to understand why these return different results ```ts Deno.test("DB()", (_) => { // deno-sqlite...

Is there a way to disable Deno Deploy server timing out in ~5 1/2 minutes?

Is there a way to disable Deno Deploy server timing out in ~5 1/2 minutes?

Object to tuple of tuple of keys and type?

Example: ```ts type SomeType = { owo: string uwu: number...

typescript compiler (38.24MB) included in bundle when importing google's npm:schema-dts

Not sure if this is a bug, but I couldn't see how the package imports the compiler. create a ts file with: import type { Accommodation } from "npm:schema-dts" deno info [file.ts] ...

debug why a file is imported

I get a compilation error from a ts file that shouldn't be imported. How can I debug the import chain to see all the files that led to this file's import statement?

Can I rename my deno.land package?

Is it possible? What should I do?

Deno Compile in NixOS docker image

I'm trying to compile code to deploy to aws lambda functions. I can do it locally on my m1 mac just fine, but I'm trying to do it inside of a docker container (github action) that's running NixOS. I should note that it builds just fine in docker container if I don't include the target argument, but then the compiled code won't run on aws lambda. ```...

Discord User Authentication Website

Can anyone help me create a web server that allows users to login to their discord account and then they get redirected back to my website, logged in.

Dynamic interfaces

Is it possible to have like an interface that has a type entry and when it is a string for example the interface has a maxlength and minlength or when its a number it has a max and min?

Deno test Leaking resources

Hi i currently try to get used to deno.test but Deno.readTextFile makes the test end in the following error:
error: Leaking resources:
- A file (rid 3) was opened during the test, but not closed during the test. Close the file handle by calling `file.close()`.
error: Leaking resources:
- A file (rid 3) was opened during the test, but not closed during the test. Close the file handle by calling `file.close()`.
...

Deno.Command arg with an asterisk?

I am trying to execute a shell command from Deno, where one of the command args contains an asterisk. Example:
const output = new Deno.Command("cp", { args: ["source/*", "destination"] }).outputSync()
console.error(new TextDecoder().decode(output.stderr))
const output = new Deno.Command("cp", { args: ["source/*", "destination"] }).outputSync()
console.error(new TextDecoder().decode(output.stderr))
...

`deno compile` in Nix results in `deno repl` starting instead of actual program

I wrote following Nix impure derivation for my Deno app: ```nix packages.api = pkgs.stdenv.mkDerivation rec { name = "api"; src = ./api;...

`@sentry/node` is throwing an export error on Deno Deploy

Hello, this is my first time using Deno. I was trying to use the @sentry/node client on deploy, but met with this error during compile:
Uncaught SyntaxError: The requested module '/v129/https-proxy-agent@5.0.1/denonext/https-proxy-agent.mjs' does not provide an export named 'HttpsProxyAgent'
Uncaught SyntaxError: The requested module '/v129/https-proxy-agent@5.0.1/denonext/https-proxy-agent.mjs' does not provide an export named 'HttpsProxyAgent'
It also throws the same error on deno locally but it works fine when using npm:@sentry/node directive....

async map

Is there anyway using the stdlib to map from one array to another array, with the work being done concurrently with async?

HTTP 206 + HTML5 video streaming with Fresh

how do I implement an endpoint to stream a video to a HTML video player using HTTP 206 in Fresh? Here's what I have so far however it doesn't seem to be working. ```ts import { HandlerContext } from "$fresh/server.ts"; import { Err, isErr, Ok } from "eav/mod.ts"; ...