Deno

D

Deno

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

Join

Fresh fetch data in component

Hi I need help with Preact, I would like to do a fetch in a component using Handlers and then use that data in the same component without the component having props that would interfere with the parent component.

Supabase-slash-PostgresSQL ConnectionRefused Connection refused (os error 111) on Deno Deploy

I'm having issues with supabase on a couple of deployments, but not others using similar code (connecting to different databases, but all on supabase). The error is the same on both: ConnectionRefused: Connection refused (os error 111). The code and connection works fine from GitHub actions and from local. Any idea what's up? Supabase status is ok. I've asked for help in https://discord.com/channels/684898665143206084/826085979344470037/1037982322378690611 as well....

package to turn html into plaintext?

i want to try turning html pages into plaintext in the terminal. any ideas?

File line operations

Hello, How to perform the following file manipulations in Deno ? - Read the nth line...

FFI how to pass (or get) 128-bit bigints to (or from) Rust functions?

I want to pass bigints from Deno and get i128 or u128 in Rust. Do I have to use typed arrays for that?

Unable to view logs to debug edge function for Deno Fresh + Deno Deploy

Thanks for making Deno, and Deploy, and Fresh. I'm a huge fan. I'm building a feature to allow user-written scripts to run at the edge. I'm persisting these scripts on my 1998.social domain. This is my edge function that proxies that data to import and execute them. Visiting this edge function will load this object for the func attribute: the proxy-able edge function as a module export. The page errors with "An error occurred during route handling or page rendering."...

TypeScript enums

So enums are objects with all keys being values and values being keys. Most of the time when using enums though, I place a specific enum, so knowing exactly what the value will be there. Is there a way to instead of referring to the object to get to the value, it just hard codes the value when bundling from ts to js?

How to get complete Deno RAM usage?

Do we use Deno.memoryUsage().rss or should it be rss+heapUsed+external?

mongodb calls on DB's rather than collections

When I do a find on a mongoclient rather than a collection ``` clnt: MongoClient, ...

can i bypass strict mode?

When I try use Deno Run , it complains error: Uncaught TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them const answer = o[s]; ...

piping for async sub process

In Deno.process, is there a way to set its STDOUT to something I can read line by line while that primary process is still running?

Deno NPM VSCode Intellisense

Is there a work around for this at the moment? I want to try out Deno's NPM support but I lose Intellisense when importing with npm:. I tried using an import map but that didn't work either. If there's a code editor or an IDE that currently supports this feature I would love to know.

Need help making fresh, rutt and preact base path aware

I'm currently trying to make fresh base path aware. I already patched rutt to work with base paths. It currently works pretty okay. Now I need help with preact as I have no experience with preact. Is there a way to tell preact to add a base path to e.g. all relative links? E.g.: <img src="/logo.svg" ... from the jsx file should be 'compiled' to <img src="/my_base_path/logo.svg" .... Or do we need to do this ourselves by adding a ${BASE_PATH} before all links? A mono-repo for this mess: https://github.com/wille-io/deno-fresh-rutt-baseurl...

How do I render react?

I'm using the configuration as shown in the Deno manual with preact, but how would I server-side render it?

How do I wait for the long running shell script to finish?

When I do this, await returns immediately. ``` const D = await Deno.run({cmd: ["sh", "long-running-script"]}); console.log(D)...

Resolving 'dynamically imported module evaluation pending, but no pending ops'

I've been getting this error quite a lot, but I haven't found a single way to know which unresolved promises cause it.
error: Dynamically imported module evaluation is still pending but there are no pending ops. This situation is often caused by unresolved promises.
Pending dynamic modules:
- file:///home/user/Desktop/js/denolasvegas/commands/main/CATEGORY.ts
error: Dynamically imported module evaluation is still pending but there are no pending ops. This situation is often caused by unresolved promises.
Pending dynamic modules:
- file:///home/user/Desktop/js/denolasvegas/commands/main/CATEGORY.ts
...

http serve and serveTls using async iterator cannot serve multiple domains

```javascript async f_serveTls() { var o_self = this // check if ssl cert exists await o_self.f_check_if_ssl_exists();...

is there a way to make deno check produce json files?

deno lint has a --json flag. is there a way to json output for deno check...

How to test if a file was created?

I'm making a deno library that creates some folders and files, how can i check if it generates then correctly?