Deno

D

Deno

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

Join

Loading Skeleton

Hi everyone 👋, I’m building a FreshJS app and running into a persistent CORS issue when trying to fetch data from Supabase. The app technically fetches data successfully, but I keep getting CORS errors in the browser console, which interrupts hydration and breaks signals like IS_BROWSER.
My goal is to have a skeleton loader show up immediately while the data is being fetched asynchronously—and then seamlessly replace it with the fetched content when the data is ready. ...

How to import from a URL in the age of JSR?

I’m down with the whole JSR thing — deno add is very useful and maintainable. However, one thing I liked about the deno.land days was that I could sometimes use a /x/ module in the browser by importing directly from a deno.land/x/*.js or *.ts url.
Is it possible to do this with JSR? For instance, is there a way to load @std/csv into the browser from a JSR URL?...

Installing packages locally with Deno

I want a local copy of a foo js (node) module in my project that I'll be able to serve to the browser directly (no bundling). If I add it with deno add npm:foo then I can reference the module in my code but the browser won't be able to resolve foo. So I would like to know how I can make a local install with Deno (that's not in the global cache but in my local project), so that I just need to serve this folder and add an importmap script to tell the browser how to resolve foo. ...

Can’t access server from another location

My friend is in Seattle and can’t seem to access my Deno Deploy server, although it works fine for me from multiple local (Boston) locations through different ISPs

TLS connections

Hi. Should'nt readable/writable streams of listeners like Deno.listenTls be handled (for example: decoded with private key passed into options) by Deno automaticaly? If not, so how can i handle it? Thanks.

What is the best way to get the full url that Deno.serve() is running on?

If I have: ``` Deno.serve( { port: 1993, hostname: '0.0.0.0' }, ...

Axios always 404 when using using proxies compared to Node.JS

Hello, I have an issue, using proxies on axios, the same code that works on Node.JS doesn't on Deno. On Node.JS the request goes through, however on Deno, I always get a 404 status code, any idea on what might cause this issue? ```ts...

Jupyter VSCode Shell Commands

Does the deno jupyter plugin for vscode support using shell commands with the exclamation mark (!)? I can't get it to work. Thanks

Nextjs 15 with prisma/sqlite failing at eventLoopTick

I get the following errors with deno but runs fine in npm. ( deno task dev ) ` ⨯ Error: Attempt to export a nullable value for "File" at eventLoopTick (ext:core/01_core.js:175:7) { name: "Error"...
No description

Setup simple prod ready Rest API project

Currently, I’m attempting to set up a simple yet production-ready REST API project using Deno. Unfortunately, I haven’t been able to find many tutorials that demonstrate how to use Deno. Could you recommend a web framework that you would suggest using with Deno? Additionally, does anyone know how to set up the environment in Zed IDE? Currently, I’m encountering red lines in the code.

[deno doc --html] q? querys returning refs to a bad url

Hey, i've been messing around with deno doc --html command Works great but couldn't help but notice that once i do a search like https://rpdjf.github.io/Jikan.js/~/ClientOptions.html?q=bas, all of the returned items are referecing to a bad base url, redirecting me to https://rpdjf.github.io/~/base.html instead of https://rpdjf.github.io/Jikan.js/~/base.html It also does that when opening my generated index.html file through my browser ...

Prisma in deno

I've been having a weird problem with Prisma, when running 100% on deno. Prisma mostly assumes you have a package.json in your project and the biggest problem is that deno just doesn't use it. When I try to run something like prisma generate, it shows the Warning: [Prisma auto-install on generate] Prisma could not find a package.json file in the inferred project root Coding\JS\norslo. During the next step, when an auto-install of Prisma package(s) will be attempted, it will then be created by your package manager on the appropriate level if necessary., then just hangs forever (yes, I've waited for a while for it). Is there any fixes for that integration or is it just not supported now?...

Does Deno block deep imports of modules not whitelisted in the `deno.json` field `exports`?

Question: Does the deno.json field exports cause Deno to block deep import access to any modules not whitelisted in the declared exports, like how Node.js package.json field exports works? The Deno config docs doesn't mention the exports field (why?!!): https://docs.deno.com/runtime/fundamentals/configuration/...

Is it possible to import styles and use them in a Typescript React component when using Vite+Deno?

deno check always complains when I try to do things like import { styles } from './MyComponent.module.css' and then use them like className={styles.myHeader}. When I do import * as styles from './MainHeader.module.css' it stops complaining about the import but then complains when I use properties like className={styles.myHeader} and says that myHeader doesn't belong there. This is for CSS modules but I guess I'd have the same issue without modules, as long as I try to access properties in component....

Transitive dependency "cannot find module"

Hello, I have some code like this: ```ts import { PerspectiveEsbuildPlugin } from "npm:@finos/perspective-esbuild-plugin@3.2.0"; new PerspectiveEsbuildPlugin();...

Test react components, having difficulty with `document global not in Deno` using happy-dom

I've done: ```javascript import { Window } from 'happy-dom'; const window = new Window();...

Can we stop a cron job?

I'm building a GraphQL service in Deno, and was thinking to use cron jobs as a means of keeping vector embeddings up to date, as it's simpler than trying to figure out how to update an embedding from a database trigger. So I have created a simple hello world cron task and it launches fine with my service. However, if the database schema is changed, my service "hot reloads", which also attempts to reinitialise the cron aspect, but cron complains that my task is already running. It would be great to have a way to stop tasks. ...

std JSON serializer/deserializer with Set and Map support

does jsr/std have functions to serialize and deserialize sets and maps? like https://github.com/denostack/superserial but for standard library

Error while authenticating deploy using github

I try to open the deno dashboard, after clicking the continue with github button, but I am presented with an error everytime:
{
"code": "internalServerError",
"message": "An internal server error occurred."
}
{
"code": "internalServerError",
"message": "An internal server error occurred."
}
...