Deno

D

Deno

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

Join

Async execution context

Is there any way I can create a global that is unique to an async operation? I would like to use that for logging operation context. Or maybe just a built in way to get some kind ID of the current operation, as in for each task in the event loop getting a different ID, than I can use regular module context with the ID.

Error Deploying to Deno Deploy LODASH isEmpty.js

I am having issues deploying to deno deploy. All was well 3 days ago. Made some changes today - but not in terms of adding/deleting libraries. Today I am getting this error: "Error The deployment failed: HTTP status client error (404 Not Found) for url (https://raw.githubusercontent.com/lodash/lodash/master/isEmpty.js)" Appreciate anyone's help here!

need to refersh page for message each time a user from different country sends a message

Hey I was going through the below deno chat app and found a bug which is the need to referesh the page each time a person from a different country sends a message how can this be fixed here is the link-https://showcase-chat.deno.dev/...

API architecture for generic callback

Hi there, I have a general question about code architecture for an API I'm doing. Basically, it listens to MIDI messages from a native library and I use an FFI binding to forward the messages to the user. A message is represented by an array of bytes, and from that you can describe its data and how to interpret it. I made a layer that converts the raw data to a typed object, but what I want to do is offer a choice to the user so he can retrieve either the raw data or the converted typed object. What I have so far is like that : ```ts...

How can I run `deno test` on all `*.spec.ts` files contains in a specific directory ?

Everything is in the question, it seems very strange that we do not have a pattern option to specify we wanna run all test contains in a directory

useEffect in the islands

Seeing a strange error in the browser window as soon as I add a simple as ```ts useEffect(() => { console.log('here'); });...
No description

Basic react server side rendering does not work on Deno Deploy but does locally

The below application work correctly locally but fails on Deno Deploy. On Deno Deploy, all my responses have a status 500 and logs show an error ReferenceError: h is not defined at handler (file:///src/server.tsx:8:33).
```typescript import React from "https://esm.sh/react@18.2.0";...

node crypto

Hey everyone, can you explain why certain packages such as node/crypto are not included in newer versions? I noticed that it is available in version 0.169.0 on this link (https://deno.land/std@0.169.0/node/crypto.ts), but returns a 404 error in version 0.201.0 (https://deno.land/std@0.201.0/node/crypto.ts). What's the reason behind this?

Pretty new to Deno, what is the recommended way to create a monorepo-like in Deno ?

Everything is in the question. I tried during the entire week-end to get up & running with monorepo-like setup in Deno. My NodeJS monorepo was pretty simplistic: - app ---- 3 projects inside (front, server, and cli)...

[fresh] injecting css into head in a component

When I inject css in the head of my html in a component, it works perfectly, but when I reuse the component somewhere in my html, it reinjects the css a second time

Autosave firing on editing `.ts` files when a separate Deno enabled project is open

Hello, I am working on slack automation using deno. I'm developing with webstorm, but I'm having a problem because the .ts file is automatically saved in the deno project, is there a solution?...

Problem with parsing `base64url` from a `Buffer (node)`

help , it works in bun but not in Deno, I don't know if is a bug from them or it's not implemented here,it also works in node: ```ts import BufferProto from "node:buffer" ...

UUID of managed KV database

Hello, I am trying to follow this doc to connect a Deno KV from an application running elsewhere (not Deno Deploy). I don't know where to find the database uuid. Is there something I am missing? Is it even possible to access KV from outside Deno Deploy?

Error at the execution of a programm

Hey ! I have a problem when i run one of my programm with deno, is a programm made with typescript but whenn i execute it in the terminal he told me that he dont find the deno module, but i have install it and this error happend only on this programm if i execute an other one i will have no problem with it. I send u some screens its better than text :))...
No description

Can't import typescript module

Why can I only import the js file and not the ts file? ```js import * as zip from "https://deno.land/x/zipjs@v2.7.29/index.js" import * as zipjs from "https://deno.land/x/zipjs@v2.7.29/index.d.ts";...

Is there a way to change the default Details of the compiled exe

I esentialy want to change the comiling defaults of the details and the image of the resulting exe ( things like Description, image, version, product name language, etc)

Setting source map root with `deno_emit`

Hello! I'm currently trying to use deno_emit so bundle some assets. The code bundles properly, however the source map is using the absolute path to files on my drive. I'd prefer if it just used relative paths, is that possible? No worries if not :) thanks!

In Deno, what is the best way to simply host static websites?

What is the best way to simply host static/cached files? Without having to do a read file call every request. And would this work with Deno Deploy?...

Using esbuild with import maps

Hello 👋 I'm attempting to migrate one of my front-end projects to using Deno for tooling instead of Node. The setup is very simple; my frontend code lives in src/ and should be bundled by esbuild and output to dist/. I'd like to use import maps to keep my front-end code easy to read, so for example, in my frontend code I have an import that looks like import { m } from 'umai'; and then in my deno.json file I have: ```json "imports": { "std/": "https://deno.land/std@0.201.0/", "umai": "https://deno.land/x/umai@0.2.4/index.js",...