Deno

D

Deno

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

Join

deno bundle react production mode

How do I inform react to run in production mode when bundled with deno bundle? I am building a SPA with react and deno from the ground up and was debugging effects firing twice, it turned out that this is caused by react's strict mode, which is supposedly 'only used in development' but I haven't been able to find any information anywhere about what 'only used in development' actually means, because I am building my bundle and deploying it to prod, so whatever system this is using isn't working. How do I get deno's bundler to inform react that it is to run in production mode?...

`deno run` looks for dependency in the wrong place

$ deno run npm:svelte-check
error: Module not found "file:///home/berzi/projects/myproj/home/berzi/.cache/deno/npm/registry.npmjs.org/svelte-check/4.3.1/bin/svelte-check".
$ deno run npm:svelte-check
error: Module not found "file:///home/berzi/projects/myproj/home/berzi/.cache/deno/npm/registry.npmjs.org/svelte-check/4.3.1/bin/svelte-check".
...

HTTP import equivalent to JSR?

Is there a way to use an HTTP import similar to a JSR? wasm-pack generated JS file has this line which makes Vite resolve to some really strange path.
module_or_path = new URL('polyvis_wasm_bg.wasm', import.meta.url);
module_or_path = new URL('polyvis_wasm_bg.wasm', import.meta.url);
...

Could not resolve dependency

Hi yall! I am currently trying to use deno for all my typescript purposes, but I came across an error I could not resolve. ``` DNAD@dand:~/Documents/GitHub/Frog-With-A-Knife$ deno install npm:fs Add npm:fs@0.0.1-security DNAD@dand:~/Documents/GitHub/Frog-With-A-Knife$ deno run dev-db...

send otel data to grafana cloud endpoint directly

If I follow the getting started guide, it tells me to use ``` OTEL_TRACES_EXPORTER="otlp" \ OTEL_EXPORTER_OTLP_ENDPOINT="https://otlp-gateway-prod-eu-west-2.grafana.net/otlp" ...

`Uncaught TypeError: callback is not a function` On clean Fresh init project

I've just initialised a new Fresh project with deno run -Ar jsr:@fresh/init . I have made no changes to the newly initialised project yet. upon running deno task dev I see the following output: ``` VITE v7.1.5 ready in 1062 ms ➜ Local: http://127.0.0.1:5173/...

🦕 Deno adds to package.json instead of deno.jsonc.

Here's my package.json for react-router-v7 deno template (https://github.com/remix-run/react-router-templates/tree/main/deno) ``` { "name": "rr7-deno", "comment": "This only exists to help vite module resolution. Do not use this file, instread use deno.json."...

How did Temporal API change?

The Deno 2.5 release notes mentioned
This release includes a big overhaul of the Temporal API.
What changed in the Temporal API? Are the changes documented somewhere?...

Could not find `.deno-deploy` folder after building project.

is anyone else seeing this?
Could not find `.deno-deploy` folder after building project.
Could not find `.deno-deploy` folder after building project.
...
No description

npm:@img/sharp-wasm32 package on Deno 2.5.0

Hi, I'm attempting to use sharp's WebAssembly package on Deno. The native binaries for the package don't work with deno compile AFAIK, so I'm trying wasm. Do I need to install npm:@img/sharp-wasm32 as well as npm:sharp? I can't seem to import anything from the former. ```ts...

My package in JSR doesn't show up in the search

https://jsr.io/@tellimer/econify This package never shows up in the search if I search for either tellimer or econify in JSR my package never shows. Maybe the index isn't being synced or there is something wrong....

Deno vs Node 24 security

Whats the general opinion on security when compared to the new node v24 which has the permission model? I am trying to push deno for a service that has a lot of power and they are pushing back saying that node will give the same protection with 24.

Stop typescript check on Deno.test

im trying to run some tests but Deno.test keeps erroring because a typescript mismatch. Long story short - I can change the files where the typescript mismatch are. How to turn this typescript check off?

i can't Verify organization to increase limits

i need your help in deno i can't Verify organization to increase limits becose of i donot have a credit card also if i need to use my bank accound i have a indin accound thaat not shoing it...

Deno compatibility with local Node/NPM package

Hey everyone, I'm hoping to get some configuration advice for a tricky scenario involving Deno compatibility with a local package that targets the npm ecosystem. I’m using a framework called SST, which generates a sidecar package inside an .sst/ directory within my project. The .sst/ directory contains SST’s internal tooling, including its own package.json and node_modules. My Deno code needs to import types from this generated directory. The problem seems rooted in .sst/ targetting the npm ecosystem, but Deno treats .sst/ like any other source code in the project, e.g., expects import foo from 'npm:bar' instead of … from ‘bar’, or import { add } from ‘./calc.ts’ instead of … from ‘./calc’....

Is using something like @opentelemetry/instrumentation-pg possible with Deno

I love the built in Otel support in Deno. It makes it very easy to get up and running with a base level of telemetry. One of the big things I'm missing at this point is tracing of my DB queries. I have it out of the box in some of my other non-Deno projects. I know this type of thing has been painful in the past with weak NPM support and no built-in Otel support in Deno but it feels like we should be in a new world. Now with much better npm support and Otel out of the box it feels like it is within reach. Looking at how to configure this library it appears I would need to register the instrumentation which it kind of feels like I would expect to get that function from something built-in to Deno since it is the thing running my telemetry at this point. Has anyone had any luck with something like this?...

Compiling Deno from source: Could not run `gn`: Os { code: 2, kind: NotFound, message: "No such file

I'm currently trying to compile Deno from source on raspbian arm32 (since there's no prebuilt binaries for arm32) and I'm running into the following error: ``` The current directory is /home/z/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/v8-137.2.1 gn gen --root=/home/z/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/v8-137.2.1 /tmp/cargo-installoYPBs7/release/gn_out ...
Next