Deno

D

Deno

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

Join

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."
}
...

[Svelte + Vite + Deno 2.0] Svelte and Vite configuration without a package.json

Hello, i am trying to setup a deno 2.0 simple project that has svelte (not svelte kit) and vite on it as well as rely only on a deno.json file for the dependency installation instead of package.json. My current situation is, i have the project setup with the needed dependencies inside of the deno.json and i have the vite.config.ts, svelte.config.ts and tsconfig.json setup as well. Initially the project works just fine when you run it with just vite, but when i try to add a Svelte component like the usual App.svelte i am being hit with this vite error Pre-transform error: Failed to resolve import "svelte/internal/disclose-version" from "src/App.svelte". Does the file exist?. I am pretty sure that the root cause for this is the fact that the modules with deno 2.0 and deno.json are being installed in a diffrent directory for me on Linux that's .cache/deno, the file mentioned in the vite error is present in the svelte module folder that is in .cache/deno/npm/registry.npmjs.org/svelte/5.15.0/src/internal/. I am not sure what i am supposed to do to make vite look into that path to fetch the file it needs. Thanks in advance for any responses...

Can symbol documentation be detected when re-exported from top level default export?

I am working on a promise util library here: https://jsr.io/@tyler/duckhawk@0.1.0 I have documented my first util with jsdoc, but re-exporting this symbol from a top level default export seems to break the jsr auto-doc detection. Update: It seems like exporting as a single default object results in the wrong type output too, which seems related. The type of default is {}. ...

Wasm In Fresh

What are some great resources to get started with using WASM in Fresh?