Deno

D

Deno

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

Join

JSR publish: source .ts or transpiled .js w/sourcemaps?

When publishing to JSR, should I be publishing the source .ts, or do I still need to transpile to .js, include sourcemaps, specify main, module, typings in my manifest, all that jazz?

Stream a Sharp object / Node Readable with Deno.serve()

This works but isn't quite as fast as piping to the response object of node:http's createServer. Can i somehow pipe the Sharp object directly to the response without writing my own ReadableStream?```ts import sharp from "npm:sharp"; Deno.serve(() => {...

Deno blog error while trying to deploy it on deno deploy

Hello, when I run deno run --allow-net --allow-read --allow-env Blog/blog.ts, it works fine locally. However, when I deploy it on Deno Deploy, I encounter the following error: ```The deployment failed: UNCAUGHT_EXCEPTION Error: Cannot run blog from a remote URL....

Getting the width and height of an image

I'm trying to get the width and height of an image but I'm not sure how to do so. Could anyone tell me how?

Deno v2 deno install not installing all dep files

Hey, trying to create a docker image using deno v2 where i install dependencies before copying source files like ```dockerfile FROM docker.io/denoland/deno:alpine-2.0.0 ...

Deno.serve() + sharp + streams

Hi, i'd like to read an image, convert it, and respond with the result. I'd like to optimise for performance (request time) and low memory usage as much as possible, which is why i tried to use Streams. Unfortunately, i couldn't get my code to work with Streams and i'm very confused between the JavaScript native Streams, Deno's stdlib, and Node's streams module. Here's my tiny example which works but is using toBuffer() which i think could be optimised using Streams:```ts import sharp from "npm:sharp";...

Deno add --dev flag not doing anything

When execution deno add --dev @package/example the package is added to deno.json as import same without the --dev flag. I noticed I could add the devDependencies in package.json, but I would like to skip package.json when using deno. What is the correct way to add dev dependencies with deno ?...

Error running deno

Hello :) I am very new to deno and need some help running basic stuff. I don't find proper documentation. ``` import { Application, Router } from "https://deno.land/x/oak/mod.ts"...

Getting Error: Could not open library: The specified module could not be found. while opening a dll

This is the code ` const dllPath = "./uFCoder-x86_64.dll" const uFCoder = Deno.dlopen(...

How to transpile typescript to javascript?

I just read the Deno 2 announcement and would like to get started using it to replace npm+tsc+node. The problem is I usually work on projects that I transpile to javascript so they can run on a browser, and I do this with tsc. But tsc expects my local imports to end with '.js', while Deno expects my local imports to end with '.ts'. Is there a way to transpile a project where local imports ends in '.ts' (so they're compatible with Deno) into javascript. I read that Deno used to include a bundler...

How to configure Deno to use an SWC-Plugin to transpile TSX?

I want to use the swc-inferno-plugin to transpile TSX. An example of the configuration using webpack with a .swcrc-file can be found here: https://github.com/infernojs/inferno-swc-example The plugin performs several optimisations during transpilations so just switching the import source etc. won't help....

Signoff deno-deploy bot's commit message

Is there a way where we can signoff commits made by deno deploy. Currently on branch change or any other changes made in deno the workflow files are changes by deno using a commit (which is verified but not signed-off). Is there a way I can customize the deno bot to signoff the commit messages too?...

deno check failing for @headlessui/react

Hello! After upgrading to deno 2 and trying to run deno check ./routes/prescriptions/[prescription_id].tsx I get an error ```...

Deno equivalent for `npm create svelte@latest my-app`

Since npm create is an alias for npm init I thought I'd just be able to use deno init svelte@latest my-app as it claims to be a replacement here: https://youtu.be/d35SlRgVxT8?t=546. What would the correct way to init a svelte app? I'd like to use a deno.json if possible rather than package.json....

Deno workspace with sveltekit(package.json) import native deno library dependency

I need information & help with the following: - I am using Deno workspace with sveltekit(package.json) - ./client and deno library ./services (deno.json) - Is it possible to import services in client? - If yes how?...

invalid peer certificate: Expired

For my sub-domains I this the aforementioned error. The sub-domain certs expired 3 days ago but they should have automatically been renewed. at least thats what the deploy UI tells me. I've redone the validation process for the sub-domain and now all is good. Would like to know though, if that is an expected behaviour or if I missed anything or if this is a bug?...
No description

nodeModulesDir with deno workspaces

Hi there, Running into an issue with deno workspaces. I have created an apps and packages directory in the root of my workspace. Inside apps I have a web directory containing a sveltekit project....