Deno

D

Deno

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

Join

Importing NPM Packages in Deno Throws 'Uncaught SyntaxError' for Specific Modules

Hi there, I'm relatively new to Deno. I'm running into an error with an NPM package import. ```JS import { BskyAgent } from "npm:@atproto/api"; const agent = new BskyAgent({...

How to override type definitions provided by a third party module

@Deno AI Helper How do I override type definitions provided by a third party module

Sync Child Stdin Read

I'd like to make a JS wrapper around the repl of another language. For example: ``js let a = otherLang10`...

Using custom font using fresh and tailwindcss

Hello ! I recently followed this guide to switch to tailwindcss. I'm using a custom font that I include in my styles.css file using @import url('/fonts/herakles/stylesheet.css');. It works just fine in dev mode but when I try to build the project I get a file not found error as the tailwindcss plugin is searching my custom font in the _fresh/static/fonts/ not in static/fonts/... Does anyone know how can I change this behavior or copy my files in the _fresh/static/fonts/ directory before the build ?...

wasm-vips file does not exist

Ok this is not directly a deno thing, but anyway. Has anyone successfully used wasm-vips with vips.Image.newFromFile(path);? For me vips.Image.newFromBuffer(buffer) works well. But opening local files directly for example vips.Image.newFromFile('sample.jpg')always complains: ```...

update imports to latest version in `deno.json`

i defined imports as URLs with the version of the packages in my deno.json file. i would like to know if there's an automated way to update all the import URLs to the latest version within the deno.json file. thanks!

Attempt on adding ref/unref on UDP

Hello, issue #20138 is about unref not being implemented for udp.UDP.prototype. I have attempted (I guess very poorly) on adding this in #21521, could someone give me some insights/suggestions on adding this in Deno? Thanks....

Fresh migrating from serveTls

In my main.ts file for Fresh I have some code I borrowed from source a few minor versions ago to serve HTTPS content when running on localhost. It looks like so ``` /// <reference no-default-lib="true" /> /// <reference lib="dom" />...

Serving static website

I have a static website with an index.html that imports a main.js and css file. When serving index.html with Deno using Deno.readFile("./dist/index.html"), I get a blank page with errors in the console for the main.js file that it references. Do I have to define all paths and return the corresponsing paths? Is there no straightforward way to do this by just passing the directory?

positional arguments deno task

Can I use positional arguments in deno task? I have a number of scripts that I frequently want to run commands against both a dev and test database. I currently control which I'm connecting to via an environment variable. So where I'd normally do ```...

Linter does not warn about lack of constructor arguments.

The vscode shows that there are no arguments, but linter does not show it as an error:
root@instance-1:~/main# deno lint src/test.ts
Checked 1 file
root@instance-1:~/main# deno lint src/test.ts
Checked 1 file
...
No description

Can you make a fresh route detect, if it is being requested by `deno run`

Can you make a fresh route detect, if it is being requested by deno run like deno run https://localhost:3000/api/test doing deno run https://localhost:3000/api/test on the fresh route gives me this error ``` >> deno run http://localhost:3000/api/test ...

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.
...

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....

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 ...

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?

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...

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....

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?

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