Deno

D

Deno

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

Join

How to integrate a legacy JavaScript project with Deno TypeScript.

I'm attempting to use this package (https://github.com/nodertc/stun) that supports the STUN protocol, which is used by VoIP systems to handle NATs and firewalls. I can use it just fine as a JavaScript package under Node, but I am tearing my hair out trying to figure out how to import all the dependencies into my Deno project. (First time I've tried to use Deno, by the way.). There are no TypeScript type annotations for this particular module. I've moved all code that interfaces with the legacy package into is own module, like this: import stun from 'stun';...

Deno + Vite + VS Code

I'm attempting to debug an error that is happening with my configuration. Right now I'm looking to use Deno as the package manager, linter, and then Vite as the bundler / tester. However, I can't seem to get the debug session working to troubleshoot the error.
I'm using the default extension generated command, but its hanging when trying to start the Vite application. It looks like its starting, but doesn't hit any breakpoints. ```...

How does FFI work under the hood when using nonblocking?

How does the nonblocking functionality of the ffi interface work under the hood when using nonblocking functions. In node for every new async function call, a new thread is spawned. How does that work in Deno?

Remap transient npm dependencies

Is there a way to remap npm dependencies to a http url? Let's say I import package 'jsr:@foo/a', which imports 'npm:@bar/b', can I remap that via my import map to https://.../bar/b.js? I basically want to remap some npm's to a cdn like jspm/esm etc, to avoid having a node_modules, for which there are reasons that I'm not going into, as I don't want to go off on tangental discussions....

Deno Jupyter with --unsafely-ignore-certificate-errors

How can i configure Deno to run jupyter notebooks with this flag: --unsafely-ignore-certificate-errors ??? I'm trying to use node-postgres module npm:pg with a RDS Postgres database that requires SSL ```typescript...

The deno account just topped up $20 for Pro a few days ago, and today it was banned!

The deno account just topped up $20 for Pro a few days ago, and today it was banned! The account is p00010@sora.qzz.io dash.deno.dev...

What is the recommended way to run CRON jobs with Deno Deploy EA?

I am having great time using Deno Depoly EA but I understand that it doesn't have CRON jobs just yet, is there an alternative atm or just use github action cron and duplicate the secrets?

Using proxies

Hi there! Im trying to make a Minecraft bot and i cant figure out how can i route its trafic through a proxy. This is my code: ```ts import { createBot } from "npm:mineflayer"; import { handleLogin } from "./handlers/login.ts"; import { handleError } from "./handlers/error.ts"; import { handleSpawn } from "./handlers/spawn.ts";...

Configure a deno.json to disregard package.json?

I have a few projects where a small Deno backend serves APIs for a classic Vite frontend (react, eslint, typescript, etc). So I have my backend dependencies in deno.json while all of the numerous toolchain deps are in package.json. This has been a pretty clean setup, however Deno has the annoying habit of also reading package.json and adding stuff from it to deno.lock. Recently I've also begun using JSR packages in package.json for my frontend app, which makes Deno crash out. ...
No description

"TypeError: buffer.readUInt32BE is not a function" in `npm:smpp`

Hi there Using npm:smpp (0.6.0-rc.4), I used to be able to connect to an SMPP server. But now on startup, I get this error "TypeError: buffer.readUInt32BE is not a function". I know this might not be a Deno issue, but I've not been able to find anything about this error....

Fresh 2.0.0-alpha.52 cannot load css files in static subdirectory

Hi, I found an issue with fresh 2.0.0-alpha.52 that if I put my CSS files under a subdirectory in static folder, I'm getting a 404 error. I noticed that other than css files, fresh can load it like image or javascript files. Any idea about this? Thanks!
No description

any way to skip setting up binaries?

im building a deno project with nix, and since some recent version (problem arised when i bumped nixpkgs) i started getting this error: ``` error: builder for '/nix/store/b9l6jmzyp52wfscr870znpdx19lpr93k-gitea-catppuccin.drv' failed with exit code 1; last 25 log lines:...

Inconsistent type checking of overloaded generic functions on publish

Hi, thanks for taking the time to read this. I'm running into inconsistent type checking behaviour of overloaded generic functions between deno check and deno publish. I would expect both to exhibit the same kind of type checking behaviour but it seems I've found an edge-case. The culprit function is defined as follows:...

String Return via Pointer (FFI) - Deno with .so Libraries

I'm developing in Deno and using the FFI API to interact with a native library (.so). I have a specific question about how to handle string returns via pointers.
No description

Inspecting Deno imports

Hello, Deno is recently new for me and I just started with Fresh, I'm trying to customize my project setup but I bumped into being unable to inspect the import statements properly. Normally using NPM I would be able check these to understand the framework and requirements for each module, function or type, but using Intelij with the Deno LSP plugin doesn't let me. I've already tried localizing the cache for the project so that the inspector can index the caches but these are hashed so not the best way. And using the "import_map.json" for each module is just postponing the problem....
No description

deno FFI, how to automatically build the shared-custom-lib while using the deno-library?

hey there, i am currently fiddling around with FFI and a custom c/rust lib.. works fine, awesome! BUT.. in the real world, once you build and put together your cool c/rust- and deno-lib.. you wanto to open-source it.. so others might use it too. in the NPM world, once you do "npm install my-custom-thingy" .. you could set it up that it build the c-lib then on the target platform and if it does not work, the install fails. ...

Unable to create Vue app using the Documentation on Deno

I was trying to check if Deno is a good environment for developing Vuejs applications. I am following this guide - https://docs.deno.com/examples/vue_tutorial/ It fails at the point where it shows how to implement api for listing dinosaurs, and updates vite.config.js with @deno/vite-plugin ...
No description

Deno not detecting/picking up tests

I have a deno project and have some testing. But deno not detecting any tests in test folder screenshot attached...
No description

How do I get the compiled code to use the local dlls, instead of trying to copy them to a temp

I keep getting the same errors. I would like to have the executable correctly use the dll available to it. IE raylib.dll Which I am using lino's raylib 5.0 deno bindings...