Deno

D

Deno

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

Join Server
Wweegee12/6/2023

Deno dependency top level await work around

I have the following error while building with dnt
[dnt] Top level await cannot be used when distributing CommonJS/UMD (See deps/deno.land/x/sqlite@v3.2.1/mod.ts 16:1). Please re-organize your code to not use a top level await or only distribute an ES module by setting the 'scriptModule' build option to false.
[dnt] Top level await cannot be used when distributing CommonJS/UMD (See deps/deno.land/x/sqlite@v3.2.1/mod.ts 16:1). Please re-organize your code to not use a top level await or only distribute an ES module by setting the 'scriptModule' build option to false.
...
Mmndeveci12/4/2023

Bundling a CLI written in JS with Deno

Hi team, Thanks for writing this excellent blog-post (and video) about rolling your own JS runtime with your application using deno_core crate. I am trying to wrap a CLI tool with that approach, however I am hitting different walls when I try to get things working. First of all, I can run this CLI by using Deno runtime directly. I can run deno run npm:{package-name} and it just works....
SSteve12/4/2023

Leaking operation op_http_close in tests

I tried to update my repositories from Deno 1.38.1 to 1.38.4. After the update my test keeps failing with the error message "1 async operation to op_http_close was started in this test, but never completed.". I tried every version in between but had to revert to 1.38.1. Failing CI run: https://github.com/sgohlke/deno-web/actions/runs/7092893428/job/19305155074 Revert to Deno 1.38.1 is green: https://github.com/sgohlke/deno-web/actions/runs/7092893428 ...
Rrikka0w012/4/2023

Does BroadcastChannel preserve the message order if the receiver is in a different geo-location?

Does BroadcastChannel preserve the message order if the receiver is in a different geo-location?
BBillionz12/4/2023

NPM CCXT Not Working

I'm trying to run the NPM Package CCXT and I'm getting an "ERR_MODULE_NOT_FOUND" error any help in resolving would be much appreciated. TypeError: Could not resolve 'debug' from 'file:///Users/xxx/Library/Caches/deno/npm/registry.npmjs.org/ccxt/4.1.75/js/src/static_dependencies/proxies/http-proxy-agent/index.js'. ```ts...
BBillionz12/4/2023

How do you use a private docker hub image on AWS Lightsail?

I'm following the guide here https://docs.deno.com/runtime/manual/advanced/deploying_deno/aws_lightsail Although how do you use a private docker hub image on AWS Lightsail? Otherwise all your code is public....
PPinolero12/3/2023

Is there a way to reset/flush my deno vk queues on deploy?

Nothing seems to be queuing. I would like to reset it if possible?
NNick12/3/2023

Return lazy struct fields from Op

My goal is to build a plugin system which allows invoking user defined code. One of the features I am looking to support is the ability to invoke user provided functions with function parameters, an example: ``` // Ideally, I can model this in an Op: type Input = { lazyValueA: () => Promise<number>;...
R!Roricchi 2.0『藤田の妻』12/3/2023

Relative path in WebSocket

Why does relative path in WebSocket not work?
Aabi12/3/2023

Relative path in `npm:` specifier

I have this in my import map:
"@heroicons/react/": "npm:@heroicons/react@2.0.18/"
"@heroicons/react/": "npm:@heroicons/react@2.0.18/"
And I try to do this:...
Iiceghost12/3/2023

Transitive dependencies with node_modules

Hi all, today I stumbled upon this not-sure-if-a-bug: ```ts import { LRParser } from "npm:@lezer/lr@1.3.14"; import { LRLanguage } from "npm:@codemirror/language@6.9.3";...
Ttas1312/3/2023

Upgraded to Fresh 1.60 but TailwindCSS not rendering

I updated my codebase to Fresh 1.60 using TailwindCSS instead of twind. When I pushed the code to Deno Deploy, the CSS didn't render. I created a separate repository with a brand new Fresh 1.60 install and deploy it as well and it also didn't render the CSS. Is there a way to fix this? Thanks in advance.
CCaramastifer12/2/2023

Optimize for Prod simple static vanilla JS script - WebServer App with Oak + DEJS

Using DEJS to render views. Those views are served by Oak, according to the defined routes. What is the best approach to include a simple js script file, for client interactions (like switching on and off a button) in the view, but making sure that when going to Production it gets optimized? Minified, Compressed... maybe have some cache management......
SSembiance12/2/2023

List all 'globals' exposed by deno

I'm trying to get a list of all 'globals' exposed by deno. I used to use Object.getOwnPropertyNames(globalThis) for this but some globals are not showing up in that list, such as console any ideas why? Should I use some other method for determining all globals that deno exposes?
R!Roricchi 2.0『藤田の妻』12/2/2023

ReadableStream passed to an island component argument becomes an empty object

I am passing ReadableStream to an island component argument becomes an empty object
Jjcayzac12/2/2023

deno.jsonc "unstable" format?

I added this entry to my deno.jsonc: ```json "unstable": [ "broadcast-channel",...
No description
R!Roricchi 2.0『藤田の妻』12/2/2023

Signal value not updating from inside of `for await of` loop inside of an IIFE

```ts // routes/connect.tsx import type { FunctionComponent } from 'preact' import type { PageProps } from '$fresh/server.ts' ...
PPinolero12/2/2023

Pricing Question - Is my pro account applied to my Orgs?

Just recently purchased a pro account cause I thought a project would benefit from the extra firepower. Thought, the project is in an organization I started. I was wondering if my pro account also applies to that org? OR would I need that project to be under my personal projects?
DDanielduel12/1/2023

Recommended `denoland/deno` contributor editor setup

I have a problem with deno trying to redefine itself via random declare namespace Deno { ... } throughout the deno repo. I use vscodium with TypeScript 5.2.2, latest Deno. I fail to find any docs on how you recommend to setup the editor to make lsp correctly pick up things....
R!Roricchi 2.0『藤田の妻』12/1/2023

How to enable "WebSocketStream" using deno.json file

I want to enable "WebSocketStream" using deno.json's "unstable" array option.
Next