Deno

D

Deno

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

Join

NPM Types issue?

Hey, does anyone have any idea why the p5js package doesn't work in vscode? I can run the code and it seems to be alright, but I can't get any npm package to give me auto-completion?
No description

Running Deno Install with --entrypoint does not read package.json properly in docker

I am currently deploying deno to lambda using the docker image, I have some npm packages listed in my package.json as I was not getting type suggestions when using them in the deno.json file the problem now is, whenever I run deno Install --entrypoint main.ts I get this error for all the dependencies in package.json...

Is there a typo in deno -h ?

I'm just wondering if this is something I don't understand don't worry 😆
No description

Is there a performance boost on the pro plan of deno deploy?

I'm trying to figure out if my app will run with more resources or respond quicker using a pro plan vs the free plan. I did notice that I would benefit from multiple deno kv read regions on the pro plan.

Ngrok npm package error

I'm trying to run some code that uses the ngrok npm package, but I'm getting this error when I try to run it with Deno:
No description

express types

I was creating a server using express and even after type annotating the request and response correctly, I get this error. One of the most weird behavior is, when I did setup the project initially, everything was working fine. The type annotation, the auto-suggestion, everything. When I closed the file and opened it again, the type annotation is there, but there's no auto-suggestion, and i get this weird error....
No description

Oak Signed Cookies error

Hi! I keeping getting this error: ``` error: Uncaught (in promise) TypeError: keys required for signed cookies. throw new TypeError("keys required for signed cookies.");...

(Not FFI related) "Unable to load deno" dyld issue MacOS

On an old version of MacOS deno 1.41 works, but all versions past 1.41 (including 2.x) result in a "unable to load" dyld issue. Was there some core change to deno around the 1.42 update?...

Using Deno 2 for simple HMR/static site dev server with Vite

We have a dead simple frontend which is 100% clientside. Just a folder of html files with some .ts imports. We are trying to unify tooling around Deno 2, but haven't been able to get this working to develop our frontend. Are there docs (specifically for Deno 2.x) for Vite setup? I'm trying really hard to keep a simple Deno setup without re-introducing node/npm stuff (just a simple deno.json config) but can't seem to get Vite working. With npm it was sufficient to just have a vite [folder of html files] dev script but no luck with Deno, can't escape unresolved dependency errors from Vite. I'd love a simple solution, it would be a shame to introduce a bunch more config for such a simple use case....

deno deployment for astro version 4.16.7

Error: Deployment failed: The relative import path @astrojs/markdown-remark is missing a prefix (should start with /, ./, or ../). I upgraded my astro version from "astro": "^4.8.4" to "astro": "^4.16.7", and now I'm facing this import issue while deploying changes on deno....
No description

Learning Process for Web Development?

Hey guys, coming from a backend background, I've mainly been coding in Python/Java. Saw a video on YT about Deno 2 and was thinking about learning web dev for fun. Can someone more experienced outline what steps I should take to start learning? The only exposure I have really is using REST APIs to get json data. Also some basic understanding of how HTML works on a webpage, but otherwise I'm totally lost! So far I've installed deno, installed the VSCode deno plugin, created a test project and executed main.ts to see the simple add example. Should my next step be doing some typescript tutorials? What about after I've learned typescript? How do I go about creating my first website? I don't have any plans to get a job in this area, so preferably I'd like to do everything the Deno 2 way right off the bat....

how to get single result from Subprocess

Hey, I am new to deno and I am learning how to communicate between parent and subprocess. In this doc: https://docs.deno.com/examples/subprocesses-output/ it shows it needs to use console.log() through std.out in subprocess. If there are multiple console.logs in subprocess, then all of them will be captured by parent. Is there a way for subprocess to only return a single result back to parent process? Thanks in advance!...

Next.JS with Deno 2.0 has "hydration" error after creation.

I want to continue using Deno and am trying to start a Next.JS project/directory using the below command, but when I run the project (using turbopack) and open the home page I get a "hydration" error. The command I am using to create the Next.JS app is: deno run -A npm:create-next-app@latest This is the error that keeps occurring:...
No description

Using TypeScript with .env file

I was wondering if anyone could point me in the direction of resources that would guide me through the process of creating type safe environmental variables for a Deno project. I am using the @std/dotenv library to read the vars but how to make them type safe. What would be considered best practice? Should I use Zod or can I extend an existing type/interface that exists? Your help is gratefully appreciated....

trying to create a cli, with @cliffy/command

trying to create a cli, with @cliffy/command and got this issue that the command doesn't seem to reflect the adjusted code... i've tried cache, re-install, ... all of these don't work... what am i missing? (im on macos btw )...

Bom dia estou tendo esse erro:

ErrwordTimingsor processing text: PermissionDenied: Requires write access to "/src/temp_audio.mp3", run again with the --allow-write flag onde eu configuro o comando de run no deno deploy?...

Using libraries from JSR in SvelteKit

Hi! I'm playing around with using SvelteKit with Deno 2, and tried to import a library from Deno's standard library to use that with SvelteKit. This, however, adds it into deno.json instead of package.json and I'm not able to import it in Svelte code. What would be needed to be able to import modules from JSR and make them work in SvelteKit?

Memory leak in Deno.serve?

i have simple proxy server like this and it has memory leak issue which i have no idea how to tackle: https://gist.github.com/pakastin/503dcbcd141e2895a3d863253483c831

PEM Base64 Error while using mineflayer NPM Package

Hello. I am interested in using Deno to build a Minecraft player bot. I used the minelayer package and the Deno runtime. I wrote simple code that should log in to the player using Microsoft authentication. I am using Deno version 2.0.3, which is running on aarch64 Linux. I am also running mineflayer version 4.23.0....