Deno

D

Deno

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

Join

To use @types/react, do I have to prefix all my React imports with // @deno-types ?

Re: https://docs.deno.com/runtime/fundamentals/node/#importing-types React does not ship with types, and they have to be installed at npm:@types/react. The documentation says types have to be imported like so:...

`deno add -D`

What is the -D flag doing in deno? I mean according to the manual: -D, --dev Add as a dev dependency But is anything imported differently in deno.json? To me it looks like it's the same...

Run Configurations in WebStorm

Hey, for some reason when I create a new Run Configuration in WebStorm it asks me to specify a file, but I only want to run task dev which works without specifying a specific file. Any idea why/ how to fix that?
No description

Tailwind override style?

Hello there! I'm trying to render equations and such from MathML! However after one frame the style gets changed or overridden by tailwind i think! If it is tailwind, how can i stop tailwind from doing this to this div? ``tsx <div dangerouslySetInnerHTML={{ __html: ...
No description

UnoCSS support

Hi all. I have been following the GitHub threads here and here. I wanted to reach out and see where the UnoCSS support is sitting. A the end of 1966 it was mentioned that would become a JSR package. Does anybody have any insight into this? The comment here contained a zip file with code that makes it work. And it does. I wan...

Cron job still "Executing" while it's Failed since +24h

Hello, my cron job on Deno Deploy is still at "Executing" state while it is actually Failed since more than 24 hours. I tried to : - commit a change to reset cron - commit with changing cron schedule - commit without cron (it got removed from Dashboard but after I reverted it got back to its previous state "Executing" while Failed) without success....
No description

Worried about cold start

Hey, I am planning to move from DigitalOcean+Express to Hono+Deno+DenoDeploy, I have around 4k-6k requests per day (very predictable traffic). I am worried about cold start problem. Currently only my pricing page is on Deno Deploy (200 requests per day), and I see 1s delay or so, but I beleive it is because pricing page is not used that often. 1. Am I correct in my assumption that with more requests cold start is going to be less of an issue? 2. How fast is Deno Deploy accomodates for change in number of requests? My current understanding is that Deno Deploy spins up nodes in advance and predicts the traffic....
No description

process.cpuUsage() is not implemented

I am trying to use Deno with my project. But seems process.cpuUsage() is not implemented.
Warning: Not implemented: process.cpuUsage()
Warning: Not implemented: process.cpuUsage()
...
No description

comparable functionality to node:repl in deno?

According to https://docs.deno.com/api/node/repl/ this Node API is currently not implemented in Deno (yet?). Is there anything comparable today? In particular, I'm interested in building my own custom REPLServer -- with a custom eval and custom completer. Is there a plan to support this Node API in the future?...

Dealing with errors in Response streams?

I've encountered problems whilst attempting to stream Responses, and discovered that if an error is thrown within the stream it just seems to be completely swallowed. Here's a simple example: ```ts...

Executable having trouble with types

I'm encountering a syntax error when trying to import files when running an executable, specifically with type imports. I have included the entire ./src/modules/test directory into the binary When running a compiled binary, I'm getting a SyntaxError related to type imports. ...

How to exclude code and imports from deno compile binary?

I'd like to exclude some parts of code (mostly related to client bundling) from deno compile library. Is it even possible?

Deno not found in nextjs15 client component

Building a small scale website with Nextjs 15 and Firebase. I think the issue is that Deno.env.get() works on server components but when its a client component, it doesnt work and it throws this error "Deno is not defined"
No description

koa-router behaves different in Deno

Trying to run following script ```js import Koa from 'koa/lib/application'; import KoaRouter from '@koa/router'; ...

Unable to find a random port on any host

When trying to run a fresh SolidStart project, I get this error: ``` ERROR Unable to find a random port on any host 10:31:48 PM at getRandomPort (node_modules/.deno/get-port-please@3.1.2/node_modules/get-port-please/dist/index.mjs:335:11)...

500 Internal Server Error in deployed project

Hey, my deployed project sometimes returns "500: Internal Server Error (INTERNAL_SERVER_ERROR_3)\n\nAn error has occurred inside of a Deno Deploy system (code 3).". Is that an error on my side / is there any way to diagnose that bug? The logs unfortunately don't show anything....

type error of express

deno error
error: Uncaught SyntaxError: The requested module 'postgres' does not provide an export named 'PostgresError'
import { PostgresError } from "postgres";
error: Uncaught SyntaxError: The requested module 'postgres' does not provide an export named 'PostgresError'
import { PostgresError } from "postgres";
...

worker with cjs code loaded from esm not working

const Worker = require("worker_threads");

const w = (new Worker(`const self = require("worker_threads");`, { eval: true }))();
const Worker = require("worker_threads");

const w = (new Worker(`const self = require("worker_threads");`, { eval: true }))();
...

Root path when compiled

Is it possible to get the "root" path when running an executable? I can't seem to get it to work... So for example I would like to get the following: C:\Users\Admin\AppData\Local\Temp\deno-compile-test.exe\deno-testing\src\...

Parsing a fetch response resulting number turning into NaN

Hi there! I'm making a website where I try to gameify the experience. However now im stuck with a problem! So I fetch energy from my supabase table. So far so good. but when I parse the response one field ("balance") gets turned into NaN! ```tsx const fetchEnergy = async () => { const response = await fetch("/api/get/energy", { method: "GET" }); const rawResponse = await response.text();...
No description