Deno

D

Deno

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

Join

use-case: web component development in deno

My use-case is quite simple, really. But I have a hard time finding the tooling to work with it. - I have plain HTML, say "index.html", some CSS, say "app.css", and some typescript. - I want to include this typescript in the HTML. - I want a webserver that reloads the index.html page whenever any of the files changes...

Starting project errors

I have error in url of Deno
No description

Conditional callback with deno_kv_oauth

Hello I am using deno_kv_oauth for my application and am trying to do the following: I want users to a have an internal uid that is the same format between oauth providers. Here is the logic flow I want to create:...

Clear deno kv db

How can I clear out the database? using list requires the keys to be known, but I just want to clear out the instances that were added by mistake

how to break console.log maximum characters limit

hi, im using usual deno run file.ts command and realized that there is a limit to number characters that shown on console.log on my terminal(which is 100 characters), is there any workaround related to this?

npm import : class is not found but it is well declared in node_module

I try to use Tatum SDK in deno (https://github.com/tatumio/tatum-js). I pick up the easiest code example https://docs.tatum.io/ I try 2 ways of imports of tatum library but I have different errors in both ways. 1. with npm ...

Interactive Jupyter notebook

Has anyone figured out how to do interactivity in a Jupyter notebook with Deno kernel in VSCode? Like showing a graphical user input like a slider and hooking it up to change something else like a plot....

Run all pending ticks synchronously

Currently it seems like run_event_loop is the only way to run all the pending ops that are scheduled including the ones that are scheduled for the next tick. Is there a way to just call the next tick on the runtime?

How can I do server sent events on the client side in deno?

I have a server api which is doing server sent events correctly, I can see it in curl doing what I would expect. One the calling side I have a simple cli written in deno and I'm trying to use an EventSource, which is not a requirement. If there is an easier way I'm all for it. The downside of the EventSource is that it is an event handler api, where you subscribe to on('message', handler) and I'm looking for an async generator api. If I just use the EventSource as is, it appears to not work at all, the process just exits right away as if its not taking out a ref(). If I convert it into an async generator then I"m getting a "Top-level await promise never resolved" error. I'm wondering if anyone has any simple examples of doing server sent events in deno client side? Using EventSource is not required at all....

unable to connect to mongodb using deno inside container

First of all, I want to mention that when I run deno task preview on my local machine / laptop, it works 🎉 . No issues there. But I need to run my deno program inside a container for depolyment reasons (currently using fly.io) it fails. I'm using the official mongodb npm client. I use it via an import map (maybe that matters?), deno.json:...

TC39 stage 3 decorators not working anymore in Deno Deploy

As of Feb 15th, deployments to #deployâ„¢ fail when using TC39 decorators. Despite the decision to support legacy decorators in Deno 1.40+, see @bartlomieju 's post here https://github.com/denoland/deno/issues/19160#issuecomment-1855462766, when compiling, the experimentalDecorators config is ignored and I suspect any decorator, including the TS 5.0 ones, causes compilation to fail. I'm supposed to go live in a few weeks and I my app doesn't run on Deno Deploy anymore. ...

Use Deno permissions in your own CLI

If I create a CLI with Deno, can I somehow reuse or pass on the permissions?
> mycli --allow-read
> mycli --allow-read
...

Has someone worked on a win32/x11/mac native window creation using FFI?

Using only operating system native libraries? No SDL, etc.
No description

How to unset white background of SVG in Jupyter notebook?

I’ve got a Jupyter notebook with Deno kernel in VSCode that displays an SVG. The SVG has a forced white background which doesn’t play well with dark mode. Digging through the dev tools shows it’s caused by a rule referencing a wrapping div. ```css...

How to get the Docker ARM image for Deno

I keep getting this error when trying to deploy my code:
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
exec /tini: exec format error
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
exec /tini: exec format error
...

VSCode Extension Failing ot Initialize

:party_deno: RESOLVED :party_deno: Having a bit of trouble using the VSCode Extension. deno does seem to be a recognized CLI, even within the terminal inside VSCode. I have tried uninstalling and reinstalling the extension multiple times as well as ensuring VSCode is up to date and full restarting VSCode. If I attempt to run any of the command palette commands I get a variation of an error as shown in the 3rd attached (partial) screenshot....
No description

deno command stdin, stdout continous reading

I am trying to spawn an AI (cpp code) however after launching the code it immediately exits. It also isn't providing any stdout either. relevant code: ```js...

Problem rerender a island when updating the value of a signal!

Hi there im trying to make a visual change to the selected category button. However it does not rerender when i change the value of the categorySignal. The attached image shows the log that i updated the category to "tournaments" but but the Current category is still "organizations". ```tsx //this is the islands/SearchFilter.tsx import { categorySignal, handleSearch } from '../signals/search.ts';...
No description

Cannot find namespace NodeJS

Hi Context: using deno with npm lib (imap). There seems to be a missing/unresolved to NodeJS that is messing u my deno check (methods inherited from EventEmitter are not know)....
No description

Which components exactly should be islands?

Hi! I am currently developing a web app using fresh and I am getting confused about the usage of islands. In the doc it is stated that:
Islands enable client side interactivity in Fresh. Islands are isolated Preact components that are rendered on the server and then hydrated on the client. This is different from all other components in Fresh, as they are usually rendered on the server only.
Islands enable client side interactivity in Fresh. Islands are isolated Preact components that are rendered on the server and then hydrated on the client. This is different from all other components in Fresh, as they are usually rendered on the server only.
However, this is still kind of a vague description for me. Is this the same as: "every component that renders jsx elements with an event handler attached or uses any browser API"? ...