Deno

D

Deno

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

Join

deno dnt not including a TS file when building a NPM package

Hello I have 2 release problems I need help with. I have a project with a file located under "lib/utils/" folder that is called "logger-worker.ts". This file is loaded from a call in another source file when creating a worker thread, like:...

Is dynamic import in global installed CLI broken?

My CLI uses dynamic imports. It works without any problems when I import it into a project. But when I install the CLI globally and try to run it, I get the following error message: TypeError: Relative import path “@std/path” not prefixed with / or ./ or ../ ...

Deno, React, Next.js

I like love the simplicity and security of Deno. However, if I need to build a React and Next.js app due to a customer requirement, are there any benefits to using Deno? (I am totally new to Deno)...

Build a React app with a starter template incorrectly setup

Hi! After running the setup for the react template https://docs.deno.com/examples/react_tutorial/ there are some errors that VSCode reports. Mainly that main_test.ts for the server can't find packages specified in: ```js import { afterAll, beforeAll, describe, it } from "jsr:@std/testing/bdd";...

Install Deno globally for all users on a Windows 11 machine

I'm setting up a PC for multiple users and would like to have Deno available to them. I've tried several ways of installing it so far, and it always was just available for my local admin user that I used to install it. I started from a fresh Win11 install. I tried: - Install from the admin account with NPM - Install from the admin account with Winget (using --scope machine)...

What are the best possible ways to create islands in Fresh?

We are developing a SaaS product using Fresh and are exploring the best ways to structure our islands for optimal organization and maintainability. We've come across two primary methods for defining islands and would appreciate your insights. Our Current Understanding: Option 1: Root-Level Islands:...

Function as a value?

I would like to know what is the best way to store a function as a value in a class because I am trying to track a constantly updating function

Deno Compile Can't Find Node Module

``` { "version": "0.0.1", "imports": { "@aws-sdk/client-ssm": "npm:@aws-sdk/client-ssm@^3.750.0",...

Vite + Codemirror in SvelteKit 4 broken due to @codemirror/state being loaded twice

I am trying to migrate the SvelteKit project from Node to Deno, and this issue is preventing me from switching over. The npm modules installed alongside SvelteKit 4 needed to reproduce are codemirror @codemirror/lang-json I would imagine that being able to change the .deno directory to somewhere outside of node_modules would fix this....

where the env vars of deployments deployed through Deploy REST API are stored?

Hey there folks, have a question. Using Deploy REST API, we can create brand new project (& deployments) and pass it environment variables, then on every request the isolate has access to them. Now, the question is, since they are persisted, where these variables are visible and where they are stored? Cuz i don't see them anywhere in my account/project/deployment info, which is good for my use case. How are they protected? Who can see them?...

Web Cache Limit?

Does cache size grow unbounded or is there a way to autoevict (LRU or something)? https://docs.deno.com/api/web/~/CacheStorage#method_open_0...

CORS problem with my deno web server

I wrote this tiny websocket server in deno: ```Deno.serve((req) => { const webSocketUpgradeRequested = req.headers.get("upgrade") === "websocket"; if (!webSocketUpgradeRequested) {...

Init KV data in Fresh from JSON

Hello guys. I'm trying to init data from JSON file to Deno KV in FRESH, where should I add this code? is it right in main.ts?...
No description

Build an app with TanStack and Deno

I'm attempting to following along with the example at https://docs.deno.com/examples/tanstack_tutorial/ and I'm unsure of where to start. I ran deno run -A npm:create-vite to start a React app (which isn't explicitly included as an instruction in this doc). The first real instruction is at "Start with the back API". Am I just creating am "api" folder inside of my React app? If so, I did that and ran the next instruction, deno add jsr:@hono/hono in my app (inside of the "api" folder) and I keep getting error: npm package '@jsr/hono__hono' does not exist. Can someone tell me what I might doing wrong and what the literal first step is? Is not to just create a React app (by any means necessary)?...

Debugging Worker modules in VS Code

Hi, I have set a breakpoint in the worker module, but it doesn't get hit in VS Code. Any ideas? Could you please inform what confits/settings need to be set or whether it is not possible at all using vs code?

[VSCodium] - Deno task list

Anyone know how to enable the task listing in Codium ? Mine stays empty......
No description

emit in Deno 2.0

I am building a distributed app that uses websockets to synchronous several "devices/browsers". On the backend I have a webSocket server that passes messages to all clients. The client themselves have a very simple UI. Becuase of their simple structure and only commonality is sharing of a class that maintains the webSock back to the server, bundleing seems unnecessary. However I can not find "emit" in deno 2.0. If I just want to transpile files and put them in a public directory for the fro...

deno_blog is broken

Hi! Not sure if deno_blog is still maintained since it's last commit was 3 months ago, but there's an error I'm encountering. I used this command to create my blog: ``` sh $ deno run -r --allow-read --allow-write https://deno.land/x/blog/init.ts ./directory/for/blog/...

How to import GoogleAIFileManager from @google/generative-ai/files

I am new to deno, I am trying to import GoogleAIFileManager from : @google/generative-ai/files, but it is impossible to me 😦 ```ts import "jsr:@supabase/functions-js/edge-runtime.d.ts" import { GoogleGenerativeAI,...