Deno

D

Deno

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

Join

NPM Import results in Rust panic

Looking to import the Airgram NPM package because I don't want to write it from scratch at this moment. The single line of code I have reads as follows: import { Airgram } from "npm:airgram@5.0.0" Running with -- inspect results in:...

Any way to catch error coming from inside npm compat?

I am trying to find some way to catch this so I can do retry logic. rn the process just exits....

Deno fmt conflicting with Deno lint, when using IIFE

// before formating
((): void => { /* code */ })()
// before formating
((): void => { /* code */ })()
after formating with deno fmt, it adds an extra semicolon before the IIFE, but deno lint says Unnecessary semicolon. Remove the extra (and unnecessary) semi-colon deno-lint(no-extra-semi)...

prototype dot functions. How?

How would I go about creating dot function that can be chained at the end of a number in Deno? Example: (2).toUSD() // returns $2.00 ```ts...

Override npm import dep with import maps?

Is it possible for me change a depedency of an npm package by using import maps? Say I want to use a different websocket than the base npm package is using....

Republish a /x/ module from a deleted repo

Is it possible to publish an old module from a new repo? i'v deleted an old one and created a new repo with module's source.

How to get Deno to fmt on save with VSCode?

I have a deno.json file with some fmt options which works if run fromt the command line but not when saving in VSCode. The belowe settings are set { "deno.enable": true,...

write map to .ts file

how would i write a Map object to a .ts file?

Integrate Twin to Svelte+Vite+Deno as Fresh

Is there any way to integrate the use of Twind into the Stelte+Vite+Deno project as Fresh does? That is, to be able to use class="flex sm:justify-center items-center ..."...

can i render some pages as SPA and some as SSR in fresh?#fresh kanalına mesaj gönder

can i render some pages as SPA and some as SSR in fresh? #fresh kanalına mesaj gönder...

How can I let my program keep running even if it receives SIGINT?

I succeeded to write a program to handle SIGINT using Deno.addSignalListener("SIGINT", ...) API, but Deno always exits when it receives a SIGINT whether I put Deno.exit() inside the signal handler or not. [Edit: It was my mistake. Deno keeps running if a signal handler was registered.] I just want my program to reload the configuration file instead of terminating when it receives SIGINT. Is there any way to do it?

How to disable deno linter for whole project directory?

I'm using deno with mixed project folders, some use Vue and shouldn't be linted by deno. How do i disable it for the project folder?

How can I get `npm` in the path for Deno.run()?

I'm writing a script to automate a tedious npm task that I run frequently. When I use Deno.run() it says that it can't find the program (see the screenshot). How can I get the npm executable in the scope of the Deno process? I'm using: - Windows 10 - Deno v1.29.4...

error: The source code is invalid, as it does not match the expected hash in the lock file.

```bash ➜ deno task start Task start deno run -A --watch=static/,routes/ dev.ts Watcher Process started. The manifest has been generated for 3 routes and 1 islands....

Use Deno.run() to communicate with Arduino

Hey I'm trying to communicate via USB serial with my Arduino. My goal is to have the result I get via USB serial available as a variable in Deno. I tried to do the whole thing with Deno.run(). This is my Arduino main file: ```ino #define POTENTIOMETER_PIN_A A0...

Best place to host server side Deno App

I have a server side app I want to host in a specific region and I only want 1 instance of it running at a time, so deno deploy is not really right for this. Are there any other hosting services that are deno friendly?...

Morgan logger alternative in deno?

Hello 👋 What are you using to log http requests in your APIs? For example I'm using morgan in nodejs but I'm wondering what's the best alternative in deno that is actively maintained 🙂 Thanks in advance!

NPM Import missing types

Playing around with some deno code and testing a npm import, the original package has types (redaxios) although when I import it it's not showing any intellisence in VS Code

Update value by reference without duplicating the data

Im exploring the world of FFI, porting some C applications I have to TypeScript, with the help of Deno. Currently, I cannot think of an efficient way to update the value that a pointer is pointing to. For instance, in C I could do something like: ```c char *array = calloc(2, sizeof(char)); if (array == NULL) return 1; *(array) = "hello";...