Deno

D

Deno

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

Join Server

Community questions

Mmatrixbyte.9/20/2023

Deno support Fleet IDE?

Hello, can the deno plug-in be used on the Fleet editor of JetBrains IDEs? Thank you.
Llil_shultz9/20/2023

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.
Nniftichristian9/19/2023

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!
Kk_xo.9/19/2023

Is there anywhere I could find documentation / examples on how to use deno_core / deno_runtime

I'd like to use deno_core / deno_runtime to safely execute some arbitrary javascript code from a rust program that'll be received from a user, I can't really find any clear examples of exactly how to do this, was wondering if anyone had any examples / guides in the best way to approach this
A.ace0049/19/2023

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/
Sstephane039/19/2023

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....
Ccarere9/19/2023

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
Kking8fisher9/19/2023

useEffect in the islands

Seeing a strange error in the browser window as soon as I add a simple as
useEffect(() => {
  console.log('here');
});
Ddidiercrunch9/19/2023

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";

// @deno-types="https://denopkg.com/soremwar/deno_types/react-dom/v16.13.1/server.d.ts"
import ReactDOMServer from "https://esm.sh/react-dom@18.2.0/server";


const handler = (request: Request): Response => {...
HHash9/19/2023

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?
Ccarere9/18/2023

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)
- packages
---- 1 project inside which is used by all 3 mentioned above

I don't have any problem with Deno runtime project (eg. CLI, server, etc), Deno delivers perfectly (it's a real pleasure to work with it on those type of project).

**The real pain reside in FrontEnd with V...
Kkamil.l9/18/2023

[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
Kkan58dan9/18/2023

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?
R.reallybored9/18/2023

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:

import BufferProto from "node:buffer"

 BufferProto.Buffer.from(
    "IntcImhlbGxvXCI6XCJoZGQvZStpXCJ9Ig"
  ,
    "base64url"
 ).toString() 

//deno: ""
//bun: "{\"hello\":\"hdd/e+i\"}"
//node:"{\"hello\":\"hdd/e+i\"}"
Nnotiggsam9/17/2023

UUID of managed KV database

Hello, I am trying to follow [this doc](https://docs.deno.com/kv/manual/on_deploy#connect-to-managed-databases-from-outside-of-deno-deploy) 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?
M.munda9/17/2023

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 :))
Ffjordwarden9/17/2023

Can't import typescript module

Why can I only import the js file and not the ts file?

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";

zipjs.Writer //undefined
zip.ZipWriter //[class ZipWriter]
Rrandomtimetv9/17/2023

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)
Zzovt9/17/2023

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!
Aabcdef389/16/2023

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?