Deno

D

Deno

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

Join

Deno Monorepo with nested applications and packages

I'm trying to move a node monorepo from NPM to Deno. It's got a set of applications in a directory called services, and set of libraries used by said services in packages. These are all independent, and are registered to the apps workspace (@example) for now. eg: if a service myapp registered as @example/myapp wanted packages/utils, it'd import @example/utils and it'd find it within packages. I'm trying to do the same in NPM but it seems like everything has to be flat, at the root. Am I not able to register workspaces that are deeper than the root directory? I've got /packages/foo/deno.json and packages/foo/mod.ts with a funciton exported. the deno.js has the following contents:...

Deno Fresh deployment failing in Github Actions

After adding Apache Echarts to my Deno Fresh website, my Github Actions now fail with a strange error: https://paste.jlcarveth.dev/paste/e04b7a13-39a8-461c-a7b1-bde1f241939b Error: R] Directory not empty (os error 39): rename '/tmp/1add3e3f311485e6' -> '/home/runner/work/eastsite/eastsite/.cache/deno/deno_esbuild/zrender@5.6.1/node_modules/zrender' [plugin deno-loader] ...

Help with File Uploads in Oak v17.1.4

Hi, I’m currently working on a project and I’m trying to upload images to my backend using Deno and Oak. However, I'm encountering an issue where I get the following message: "Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:3000/upload. (Reason: CORS header ā€˜Access-Control-Allow-Origin’ is missing). Status code: 500." I’m confident that this isn’t a CORS issue because I’ve previously managed to send data to my backend without issues. When checking the backend, I get the following error message:" TypeError - ctx.request.body is not a function "...

upload files

I am working on a web development project, and in this project, I have a constraint that says I cannot use any frameworks. However, for my site, I need to upload images. For example, in my case, the user should be able to send images to my backend so that I can use them later on my site. How can I do this with Deno? If you could tell me how to do it and provide a small preview example, that would be great, please.

502: Bad Gateway (ISOLATE_INTERNAL_FAILURE) for long requests

I deployed a simple proxy on Deno, which just forwards my requests to TARGET_URL. When TARGET_URL responds quickly everything is OK, but when it takes 1-2 minutes to respond, I get an error: ``` 502: Bad Gateway (ISOLATE_INTERNAL_FAILURE) ...

Unable to compile the small file

I have create small "hello-world.ts" file, And I'm trying to compile it. It is failing to compile with following error. Check file:///Users/harshrastogi/Developer/hono/test.ts Compile file:///Users/harshrastogi/Developer/hono/test.ts to test ...

LTS 2.1.12 Deno generates `deno.lock` with version 5.

šŸ‘‹ Please help me fixing situation with broken deno.lock file. 1. I have installed Deno via shell script from docs. 2. Then initiated a Deno project, then added Fresh, etc. 3. During Deno Deploy I found out that version: 5 in lock files causes the problem. ...

Can't get inlay-hints working in helix and deno-lsp

Everything is working but the inlay-hints, any help?

OpenTelemetry Setup with Axiom.co

all the docs and demo videos by deno assumes that the endpoint is not authenticated. can someone help me to configure this with Axiom.co endoints I tried with these variables within env but this didn't work ```...

Cannot read `include`d folder in compiled file

Hello, I am trying to compile an application and read a folder that I include with it. I am running into a problem with the output. I don't know how to read a directory inside the binary that I have included. I ran this command deno compile --include config to include the folder config in the binary, but I don't know how to read it and where to find it. This is my folder structure: ```...

Vitest borked when inside Deno workspace

Not sure if this is just a misconfiguration or a bug somewhere, so I figure I might as well shoot my shot here. I installed SvelteKit with Vitest, Playwright and Deno as package manager. I had to change some generated npm commands to deno, but otherwise this configuration seems to work great. I then tried to integrate this setup into a Deno workspace, but that didn't work out so great......

How to install an electron app from it's repo?

While browsing for some WebGL games i came across this game, and was suprised to see on their discord that they would have a Linux client soon. So when i asked i was directed to: https://github.com/OnRushStudio/Venge-Client And told to clone the repo and run npm start inside it. Now we all love Deno right?...

Intellij - Not so great experience

Hey šŸ‘‹ I'm running into a rough time using Deno with IntelliJ. Features like go to definition and syntax highlighting aren't working at all for packages imported from JSR. I've tried a few examples, and none of them seem to work: ```...

Local npm package

I have a private local npm package located in /packages/my-package, which has its own npm dependencies. How can I install this in my deno project (same repository)? I'm reading it should be possible now with https://github.com/denoland/deno/issues/15624, but I dont know how to implement this. Does it require the package to be published? How do I import it?...

Using scopes in deno.json to mock modules for tests

Hello, I have something like this in my deno.json ```json "imports": { "#css": "./src/css/documents.ts",...

collab

anyone down for a collaboration for an project/brand someone who can build a artunning website, yeah...

`deno run --cached-only` downloads stuff anyways

Hey there šŸ‘‹ I recently upgraded a project to deno 2.1.10. When starting the server, I noticed that deno would download a bunch of packages. DENO_DIR=build/cache TZ=UTC deno run --allow-all -- src/server.ts ...

how to persist data with deno kv when running a docker container?

I’m building a deno project using only the built-in deno kv. I know you can also use the self-hosted backend, but for now that's outside of my scope I want to containerize the app with docker using a single Dockerfile for simplicity what I need help with:...

VSCode JSX prop suggestions

I'm trying out Deno for the first time and can't seem to get proper intellisense for JSX. The IDE does recognize the imported types but I don't get any suggestios on props. See the attached image. Not too sure if this even is a Deno issue but I though I'd ask. I've looked through a few existing posts but nothing helped. I'm using VSCode and have initialized a Deno worksapce. This is the entire deno.json...
No description

Vite dev server with HTTPS (node:http2)

Hi, posted a comment there: https://github.com/denoland/deno/issues/26088#issuecomment-2812421778 There are a few threads that are unanswered. It looks like node:http2 is supported accoding to this? https://docs.deno.com/api/node/http2/...
Next