Deno

D

Deno

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

Join

Install issue

I am triyng to instal Deno but i always get this error and I cant solve it. Help pls!
No description

LSP: Uncached or missing @types/node when importing node:process

I'd like to understand better what's going on here in case it's a potential bug in node interop:
// test.ts
import process from 'node:process';
console.log("arch is", process.arch);
// test.ts
import process from 'node:process';
console.log("arch is", process.arch);
The LSP flags node:process with Uncached or missing npm package: @types/node. Running deno cache test.ts does not change anything, but if I manually run the same commands in a deno repl, I notice a status message appear after running the import: Download https://registry.npmjs.org/@types/node. After doing this in the repl, then I can reload the LSP and it no longer flags this line....

Deno vs Node for writing a React component library.

Hi all. I love Deno and what it does, but I need some help deciding if it is right for my small project. I am a backend developer with some fair JS skills, but I would say weak at the world of front end tooling. WOULD USING DENO TO CREATE A SMALL REACT COMPONENT LIBRARY BE A GOOD, practical idea, or would the pragmatists say use Node for now until Deno is more proven for that? Sorry if this should be obvious or plain to see.

run code at the start of every hour

I would like the most performant code pls.

Denoflare scheduled workers

Cloudflare has a cronjob feature for running workers at a scheduled time. Wrangler has a flag wrangler dev --test-scheduled (https://developers.cloudflare.com/workers/runtime-apis/scheduled-event/) allowing users to test their scheduled workers via curl "http://localhost:8787/__scheduled?cron=*+*+*+*+*". I read the Denoflare documentation https://denoflare.dev, but it isn’t very clear how to develop scheduled workers. cc @John Spurlock...

fresh.gen.ts blank

hey folks. I've been using fresh for a while as a hobbist. Recently started a new project using the suggested deno run -A -r https://fresh.deno.dev fresh-site fresh.gen.ts is created as expected with boilerplate config. However upon deno task start the regenerated completely empty and complains that the file does not contain a "default export" , although the cli correctly identifies the 5 routes and 1 islands. ...

Can extension state have fields that require passing lifetime?

It is possible to pass bounds and parameters to the extension! macro but as far as I see it doesn't support lifetimes?

Limits for background tasks

I was thinking of making a filter page for users of multible game cdns, like steam, epic games, and so on. It would require some background tasks to run on interval, and fetch and organize some common data. What are the limits for free/pro accociated to functions running from setInterval(function, delay)?...

Compiled binary from Cross-Platform CLI example will not work

Going through https://deno.com/blog/build-cross-platform-cli and running the output file, I get
Symbol not found: _sqlite3_unlock_notify
Symbol not found: _sqlite3_unlock_notify
in MacOS. what am i missing here?...

Deno Vite App CLI doesn't match Deploy Docs

I hope this is the right channel for this. (Deno team is probably already aware of this, but posting just in case). The issue is that if the command line directions are followed, I'm getting an error. The directions on Deno Docs [ https://deno.com/deploy/docs/vite ] has the recommendation for 'deno task build'. Which is needed to not have an error. ...
No description

third party module not updating / releasing

Dear all, I have just added a github repo , https://github.com/jonasfrey/o_file__wav, added a webhook (https://api.deno.land/webhook/gh/o_file__wav) selected content-type : application/json, selected only 'Branch or tag creation' . then i have added a tag with git tag 0.1 and git push --tags but the module does not appear on https://deno.land/x/o_file__wav@0.1 what could be the problem ?...

Possible error in Deno.rename

I’ve noticed that Deno.renameˋ does not actually throw a ˋDeno.errors.AlreadyExists on Linux and BSD/macOS when trying to move a file that one that already exists. Is the best path forward to raise an issue in the Deno repo, or is here a valid channel to discuss this? The standard library’s fs/move method works fine

Outgoing connection over TLS (port 465) from the deno deployment is failing

I am trying to send an email via Gmail SMTP. The code is trying to connect to smtp.gmail.com on port 465. The connection fails with the error below. Locally, from my mac, the code works as expected. Is it the limitation of the edge platform? The error:...

setting module scope variable based on module import path

I have a big utilities file with many helper functions, mostly arround html parsing. Many of which take a locale argument ("en-UK"). The importing module knows the locale, so I would like to set globalThis.defaultLocale via the import path, something like import { util } from '/utilities.ts?locale=en-US'. Is it possible without generating the files per locale or invoking some "setDefualtLocale()" function at every importing module?

How to import a npm package that relies on Wasm

I'm trying to import npm:@biscuit-auth/biscuit-wasm@0.4.0 and I wrote the following script: ```TypeScript import * as biscuitAuth from "npm:@biscuit-auth/biscuit-wasm@0.4.0"; const root = new biscuitAuth.KeyPair();...

Deno deploy --allow-write permission.

I'm writing a small web app that uses tilia (https://deno.land/x/tilia@0.1.2) to manage a small json database. But when deploying (with Deno Deploy) it throws this error: ``` PermissionDenied: Requires write access to '/src/data/db/entries.json.db', but the file system on Deno Deploy is read-only. at Object.writeFile (ext:deno_fs/30_fs.js:807:18) at init (https://deno.land/x/tilia@0.1.2/src/storage.ts:4:16)...

Getting values from Deno KV in a Web Worker always return empty array despite working correctly o...

Getting values from Deno KV in a Web Worker always return empty array despite working correctly outside the worker context (in the parent app). What can cause this behavior?
No description

Simple Deno program on Windows quits after 20 seconds

Hi I have created a simple deno program and now compiled to an exe file for window using the command deno compile --allow-all --target x86_64-pc-windows-msvc ./index.ts. I've also compiled to mac and it runs just perfect. The program is like a setInterval that logs some info. However on Windows, the program boots up, it logs to the console just fine every second but quits without any notice after like 20 seconds. Any idea what this might be?...

Need some help for Deno/FreshJS project

I have a Deno/FreshJS project and need some help from someone with extensive experience in Deno/FreshJS. Could anyone help me? Hopefully to kindly direct message me.