Deno

D

Deno

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

Join

Using Deno's readDir in a SvelteKit project?

If I have created a Svelte project using deno, and I am going to be static rendering it, can I use the Deno API in my typescript files? For example, suppose I want to call readDir?

Error while installing using cargo

all I did was run the supplied command from the website (cargo install deno --locked) after installing cargo, however it errors out during the build, is there something I'm missing here? `` error[E0658]: let` expressions in this position are unstable --> /home/magnus/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/deno_ops-0.238.0/op2/dispatch_slow.rs:150:8 |...

Where to set the migration command in provisioned prisma database

In the documentation it says to set the migration command during app assignment or database editing but during both no field for Migration Command is present Link to the docs where this is stated: https://docs.deno.com/deploy/reference/databases/#migration-and-schema-management...
No description

LSP auto-import in workspaces

What ? The Deno LSP seems to partially work in a workspace context. I've made a GitHub repository that can help you reproduce the issue: https://github.com/aburii/hono-backend ...
No description

Windows Server support?

Our YT-DLP environment is needing Deno to function. I placed the Deno.exe, updated PATH, and ran the --version test and it resulted in a popup error saying "The procedure entry point i IsWow64Process2 could not be lcoated in the dynamic link library {path}\deno.exe". This is on Win2016 server. Is this OS not supported by Deno? TIA for the help.

Getting file:///src/src/server/schema path doubling error on Deno Deploy

😩 Hi! I'm deploying a Hono app to Deno Deploy and getting a persistent path resolution error where src/ is being doubled: Module not found "file:///src/src/server/schema" My setup: Hono v4 from JSR (jsr:@hono/hono@^4.10.1) Deploying via GitHub Actions to Deno Deploy Using path aliases in deno.json...

Call a function from JsRuntime without handle_scope

Does anyone have any idea why the "handle_scope" method was removed from the JsRuntime struct? I 've been trying to call a function from a loaded file but this makes it pretty much impossible. Any idea how to do it without using execute_script? (as I want to capture the result)...

Permission sets not working with `jsr:@std/http/file-server`

This is my first time trying the new permission config, bear w/ me plz. I'm trying to use permission sets for a static file server task and it still asks for the permissions when running: Here is my deno.json:...

publish error different on CI

I run this command:
pnpm exec deno publish --dry-run --unstable-sloppy-imports --allow-dirty
pnpm exec deno publish --dry-run --unstable-sloppy-imports --allow-dirty
on my local project and in the CI....

Ambiguous linting on import type and jsdoc

I want to enforce the usage of import type when no value is referenced in the module, and it works most of the time. The issue happens when I reference another type using @see in jsdoc, this is very common for foreign keys in DAO / Entity interfaces such as Drizzle / Kysely. When this kind of reference exists, import type results in errors inside the jsdoc for value referencing; while normal imports results in the lint error of verbatim-module-syntax itself....

Custom Lint rule not applying in IDE with Deno Extension

When I'm using a custom lint rule, it applies the rule correctly when using deno lint but it is not applying the rule in the regular VS Code IDE. Is that expected behavior, or am I potentially missing an implementation piece that does that dynamic analysis.

Load Typescript into deno_core::extension!

Hello, As we know, deno_core provide extension that makes possible to create "built-in" functions or classes. But, I want to provide a typed API, if possible via Typescript. Currently, I use deno_core to implement function to extract / mining data in Typescript. It will be very convenient to also provide built-in types that has type....

square

looks like the Square API is not compatable with Square "npm:square", what are people using to interface with Square APIs?

[Bug]: Deno expects text or bytes files lines to be in Quotation marks

I've two files that I wanted to import, trying to import them either as text or bytes results in Deno trying to parse them as javascript unless the lines were inside double quotations ```ts import wgServerPublicKey from "@wg-server-publickey" with { type: "bytes", encoding: "utf-8" }; // same error if type: text import wgServerConfig from "@wg-server-config" with { type: "bytes" }; // same error if type: text...

Failing to create import alias for tauri project

Hello everyone. I created a tauri project recently with deno and one of the things I'm trying to setup are aliases so I don't have to use relative imports within my vue files. As per docs, I created a deno.json file in the project's root: ``` { "$schema": "https://raw.githubusercontent.com/denoland/deno/refs/heads/main/cli/schemas/config-file.v1.json",...

getting a "TypeError: t.expireTags is not a function" on deploy-ea with Next.js

When calling a server function that includes revalidatePath i get a "TypeError: t.expireTags is not a function" error. Did anyone encounter a similar problem? Building and running this locally does not produce the error....

Node compat for `matchesGlob` from `node:path`?

Hi there 👋 I'm new here but have been a deno fan from the get-go and have several project running on deno deploy v1 and v2 - love it!
I'm using deno 2.5.2 locally
...

CSP related complications

Content Security Policy of your site blocks the use of 'eval' in JavaScript I am getting this in the browser. I am trying to access ws://localhost:5712/ws from an island.

Auto type generation with ReactRouter + Vite + Deno

I'm attempting to get ReactRouter working with Vite + Deno. My application runs fine, but I'm running into static type issues in the IDE. (first image) My main files are .tsx files, but for some reason the type generation is generating the path via .js instead. (second image). ...
No description

Is it possible to run --unstable-raw-imports flag in Deno Deploy (classic)?

Getting a The deployment failed: The import attribute type of "text" is unsupported when trying to deploy on Deno Deploy Classic with text based import attributes: import example from "./some/file.txt" with { type: "text" } Works fine locally when adding "unstable": ["raw-imports"], in deno.jsonc or even running with the --unstable-raw-imports flag as per Deno docs. Maybe this is not (yet?) supported on Deno Deploy?...
Next