Deno

D

Deno

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

Join

Unable to use Deno.createHttpClient without deprecated flag --unstable

I expected it to be behind the newer --unstable-net flag

Multiple JsRuntimes crashe if first is not dropped before a second is created and ran

In my application, I want an op2 to take in a function which will be stored in a struct as a Global<v8::Function>. Later this function will be called. This issue is the application crashes with Memory Access Violation. However, this only occurs on the second instance of the JsRuntime. Additionally this doesn't happen for the first few call, which leads me to believe it is something with the handle be garbage collected.

Structure microservices

Hi, how would you structure a Deno microservice repository with a good developer experience (good debugging, ..., communication using message brokers)? Do you have any example?...

Get image from automated download

I have this page which displays a render using threejs and renders it into a png and downloads it. i need that image to use it in a canvas from deno-canvas but when i download it using this package it returns this:
error: Uncaught (in promise) Error: The filename, directory name, or volume label syntax is incorrect. (os error 123): writefile 'C:\Users\titul\AppData\Local\Temp\deno_dwld2b5d29e3bc7dd136/E:\Arcunis\recipeImageMaker\stone.png'
error: Uncaught (in promise) Error: The filename, directory name, or volume label syntax is incorrect. (os error 123): writefile 'C:\Users\titul\AppData\Local\Temp\deno_dwld2b5d29e3bc7dd136/E:\Arcunis\recipeImageMaker\stone.png'
code where i download it:|...

Get image data from automated download

I have this page which displays a render using threejs and renders it into a png and downloads it. i need that image to use it in a canvas from deno-canvas but when i download it using this package it returns this 'C:\Users\titul\AppData\Local\Temp\deno_dwldf3d5cf300f407d23/E:\Arcunis\recipeImageMaker\stone.png' code where i download it:| ```ts import { download } from "https://deno.land/x/download@v2.0.2/mod.ts"; export default async function generateBlock(block: String) {...

Wait until Deno.Command process has exited

How would i stop code execution until the process has exited? since its not a promise i cant just do await. is there a way and how?

Why JSX is not working ?

// @deno-types="@types/react" import React from "react"; const A = (): React.ReactElement => <div />; const B = (): React.ReactElement => <A />; ...

Running with --cached-only not working

First I cache all dependencies of my typescript file: deno cache --lock=deno.lock --lock-write server.ts Then I try to execute the file using --cached-only:...

Subhosting Deployments

I've been playing around with deno subhosting. I get the concept of a project and deployments in a project. I saw there is a redeploy api endpoint but it doesn't seem that you can change the code of a deployment. Is there a way to do this or is the best way to delete the previous deployment after a new deployment is successful? In this case I'm thinking of each change to a repo being a new deployment so you wouldn't want to keep the old version. Let me know if there is a better way to do this.

The new and updated version for using socket.io handler with Deno.serve()

Hey there! am getting a error when I pass socket.io handler to Deno.serve(), Here is what am doing : Deno.serve(io.handler(), { port: 3000, });...

Sorting tailwindcss class names with prettier plugin?

When developing in Fresh, I would like to have my class names automatically sorted with the official prettier plugin. How do I enable prettier plugins in a Deno project?...

How to validate types in API Requests and Responses?

Hello, I'm wondering how to validate and handle the types in my app's API. I'll use the example found in the docs as an example: ```typescript // routes/api/users/index.ts export const handler: Handlers<User | null> = {...

Deno LSP + React + TypeScript + Vite (--node-modules-dir)

Does the Deno LSP works with the --node-modules-dir option? did ```sh deno run --allow-env --allow-read --allow-write npm:create-vite-extra ....
No description

deno_runtime NpmResolver like the CLI?

As far as I can tell, if I want to embed Deno in my Rust application using deno_core and deno_runtime, I would effectively need to implement my own npm: specifier resolution. https://docs.rs/deno_node/0.76.0/deno_node/trait.NpmResolver.html I found this trait I can implement, but what I really want is for module imports to just be identical to how they are when running code from the plain Deno CLI. People seem to say frequently that deno_runtime is the solution for copying the Deno CLI's behavior in a custom executable, but I can't find any existing structures that mimic the module-graph mapping behavior that is included with the CLI, so wouldn't I be better off just forking the CLI code?...

Is it possible to share the same privateLink in Deno Subhosting?

Recently we are trying to implement a "custom js function" module in Deno Subhosting, our concern is about the performance and latency, since our product is a cloud database, so we need our custom function(hosted in Deno Subhosting) to interact with our cloud database for fetching data. After the search, we found this: https://deno.com/subhosting/docs/endpoints-and-regions to make endpoints have the same region to our data service. Question1: Any other suggestions for the performance, especially interact with other services? Question2: We saw the Enterprise License had a upcoming feature, deploy on your own cloud, when will this feature release? ...

Source generation for dependencies

Hello, I'm working on a source gen for a library (Node, Deno, Bun) and currently my idea was to override the default types of the library by replacing the file on the node_modules folder, however Deno does not use the node_modules folder so I'm not sure what alternative I have. I have noticed that Deno has a vendor command that puts the deps in a vendor/ dir, (but in my testing it creates a node_modules dir instead), would that be something helpful for what I'm trying to do? For context, the library by-default should ships with a complete interface object and then a CLI* would update those types based on a bunch of configs the CLI* (and runtime) reads adapting the types with the CLI* and the runtime objects, currently the library only does the runtime part and the DX is awful since TS does not have the context to know that the runtime wont have the proprieties....

Fetch errors out

Failed to serve connection: hyper::Error(BodyWrite, Os { code: 55, kind: Uncategorized, message: "No buffer space available" })

Deno Jupyter Notebook - monorepo support

Hi all! We have a typescript-based monorepo that uses Turbo/Pnpm/etc Our primary reason for coming across Deno is that it seems to be the best supported way to use Typescript in a Jupyter notebook. We'd like set up a notebooks/ subfolder in the apps/* folder of the project and do queries there I haven't been able to set this up (maybe due to inexperience with Deno). For example, both of the following commands fail:...

workspace import

I have a vsc root-level settings.json file ```json { "deno.enable": true,...

How Enable HTTPS localhost DENO?

I want to run Deno Oak over Https in local. I use OpenSsl/mkcert to create cert and key. But no works.
No description