Deno

D

Deno

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

Join

Deno.connect failed to read all bytes when connected to smtp #help

After sending "HELLO EXAMPLE.COM" It should receive many lines of text i.e 250 first string 250 second string The reader only returns the first string....

is it possible to use deno std libraries that are "browser compatible" via npm?

hello i am currently working with yarn+vite project for a small website project. i want to use this base64 library: https://github.com/denoland/std/blob/main/encoding/base64.ts in my project, but i'm having trouble figuring out if this is possible through npm: https://github.com/denoland/std/issues/641...

Unable to run Deno plugin within Webstorm

Webstorm version 2024.3.5 Deno plugin version 243.22562.13 My project's deno.json is located in ...
No description

Deno env vars

In a Deno/Fresh app I have a config file that provides access to env vars, however when I try to run my migrations via
deno run --env-file=.env db:migrate:latest
deno run --env-file=.env db:migrate:latest
...

Is there a way to handle permission prompts from a worker?

I would like to give a worker net/import access to any public IP over https, without giving it the ability to bind to any address or access private IP addresses. The docstring for the net property on the deno.permissions worker option says if set to string[], the net permission will be requested with the specified host strings with the format "<host>[:<port>].", and hooking that seems like the easiest way to do this kind of permission filtering logic, but I can't figure out how to.

high memory usage using compiled binary in docker

```# Build stage FROM denoland/deno:2.2.3 AS builder WORKDIR /app COPY . . RUN deno task build...

`ts-match` unable to infer types properly

I'm using the ts-match library to do some pattern matching on an object, and it seems unable to infer most types properly. Perhaps someone has experience with it. My code is https://pastie.io/htxtti.ts and I'm seeing errors left, right, and center. * 1: Type 'unknown' is not assignable to type '[typeString: string | undefined, skipImport: boolean]' * 9: Object literal may only specify known properties, and 'enum' does not exist in type 'Matcher<never, unknown, any, any, unknown>'...

Unable to deploy Next.js following official guide

hi there 👋 one of deno's main selling points over choosing another runtime like bun is that it promises next.js compatibility, but i haven't yet been able to build and deploy a next.js app with deno. I've tried following this guide from deno but cant get it to work. i filed [a bug report with reproduction steps on the deploy_feedback github here....

How Node.js SQLite works on Deno?

Hello, I'm curious how node:sqlite is supported in Deno? Basically you reflect the APIs exposed by Node.js? Or you get/fetch the code from Node.js and compile it to Deno? Because there are open issues in Node.js for SQLite and thought if those will be reflected in Deno once Node.js deploys them.

How to create private packages in deno and not fall into ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING

Hi everyone! Maybe someone already solved this problem, but I could not find any information or "how to" guide, ChatGPT did not help as well. The problem: I have few private repositories in gitlab, all uses deno as runtime, I want to share some duplicated typscript code written in deno (i.e. all imports ends with .ts extension, also present libraries like "jsr:@std/testing/bdd"; ) so it cant just be launched with node. Have decided to move shared code to separate repository and make a npm package from it (keyword is npm here). ...

How to use cron?

I have this test repo on deno deploy: ```js import express from 'express' import { cron } from "https://deno.land/x/deno_cron/cron.ts"; const app = express()...

Running vite and a deno server in workspaces

I want to write "deno task dev" and it will then start both the frontend (written with vite) and the deno backend at the same time. the closest i got was this: ```json {...

Instancing Rust Structs in JS and maintaining a list of them in Rust

I am struggling to create an extensions for deno_core that would allow me to create Rust Struct instances via JavaScript, but maintain those instances in Rust. What I mean is this: I have a Rust Struct called Rect that I use as a Resource in deno. For the sake of brevity I will reduce its fields in this example to two coordinates, top and left:...

Lume CMS

Hello, I have an issue when I want to deploy Lume CMS with deno deploy. I have my lume CMS storage config set to the src folder and I followed the documentation steps here https://lume.land/cms/deployment/deno-deploy/ the CMS is live but when. I want to edit the data, it doesn't edit in the src folder but in the root folder. Is it normal? Here is my cms file...

Any way to retrieve org uuid with org access token?

Hi folks, I'm trying to get an org uuid via the API, if possible. I know with a personal access token (ddp_*) you can hit the /organizations endpoint to get a list of orgs a user is in, but I'm not sure if there is a way to get an org's uuid the same way, using an org access token (starting with ddo_*) - Attempting to hit the /organizations endpoint with this just results in an access denied error....

Questions about Subhosting

The last message in the #subhosting channel was that any questions should be sent to support@deno.com. So, I sent the following message last week, but haven't got a response: Hey, I feel like I’ve missed something in the docs, but is there a way to subscribe to a hook when a deployment goes live? When I call the API and get back an ID, then call the URL, I get a "not found" error for a few seconds. Is there a webhook or socket I can subscribe to in order to know when it becomes available?...

Types on transitive dependencies

I'm developing a simple slack application. I'm importing a module like so: ```js import { App, ExpressReceiver } from 'npm:@slack/bolt'...

'deno run' for tasks question/Bug 🐞

Hi I am not sure if this is a bug, so I thought to ask here first. So I understand Deno has both 'run' and 'task' sub command for running tasks. However if there is a 'directory' and a task with same name, I find Deno conflicts and gives directory a precedence:...

Issues installing npm packages

Im attempting to install discord.js (an npm package) via cli using deno install npm:discord.js It says its added successfully and shows up in deno.json, but says I don't have the module installed when I try to use it in a ts file....
No description

Nextjs+prisma on deno deploy !

Is possible to deploy nextjs+prisma on deno deploy ? I ask because I faild to do it even I ran nextjs+prisma in local using deno