Deno

D

Deno

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

Join

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/...

deno compile --include whatev.wasm

I'd like to include a wasm file as data, but when I try to --include it I get
error: Relative import path "env" not prefixed with / or ./ or ../ and not in import map from "file:///var/home/bennyp/Developer/design-tokens-language-server/src/server/css/tree-sitter/tree-sitter-css.wasm"
error: Relative import path "env" not prefixed with / or ./ or ../ and not in import map from "file:///var/home/bennyp/Developer/design-tokens-language-server/src/server/css/tree-sitter/tree-sitter-css.wasm"
...

Basic Mocking example for `override global or imported objects` does not work

I am following the example https://docs.deno.com/examples/testing_tutorial/#basic-mocking and when run with deno test --no-check the example fails with: ``` getUserDetails formats the name correctly => ./service_test.ts:5:6 error: TypeError: Cannot assign to read only property 'getUserFromDB' of object '[object Module]'...

Avoid newline at the end of Deno.stdout.(write/writeSync)

Here is my use case: I have a cli that outputs some command like git clone <url> and I want to print editable string in terminal so that I could replace the <url> with the actual repo url. ```ts...

Writing the whole buffer to stdout

TL;DR: How to i make sure an entire buffer is written to stdout before continuing? Hello! I'm naively implementing the language server protocol in Deno, based on some youtube tutorials 🤣 I've noticed quite some jank, errors, and dead handlers in my clients, for example, this complaint from neovim:...
No description

What is the proper way to write crons in a Fresh project?

Importing files calling Deno.cron() in the dependency tree of dev.ts would halt the build process during deno deploy. Is there a recommended way to add crons to a Fresh project?...

Deno KV on deno deploy

Why can I not setup Deno KV or see the Deno KV tab on dash.deno.com? It's been a couple of months since I went on the dashboard but I tried creating a new Deno Deploy project and setup deno kv but it won't work. Every time I try to open my poject in the dashboard I get redirected to this page......
No description

Deno compile: LoadLibraryExW failed

Hi fellow Deno + Turso devs, I need help. I am getting Uncaught (in promise) TypeError: LoadLibraryExW failed (attached screenshot) on running the compiled version (executable) with Using drizzle w/ all permission enabled (-A)...
No description

kv.watch() not working

for await (const entry of kv.watch([['chat']])) console.log(entry);
for await (const entry of kv.watch([['chat']])) console.log(entry);
The only thing this does is immediately prints the following: ```...

Debugging tests with Vitest

I am trying to launch tests in debugger. According to vitest documentation https://vitest.dev/guide/debugging.html#node-inspector-e-g-chrome-devtools running it as vitest --inspect-brk --no-file-parallelism should work just fine. So I tried:
deno run -A npm:vitest --inspect-brk --no-file-parallelism
deno run -A npm:vitest --inspect-brk --no-file-parallelism
...

Google OAuth2 flow with Deno Fresh

Asking for a little assistance with my Google auth flow- specifically for nuances with redirecting and creating/accessing cookies (I use a "token" cookie for auth). Here's my current flow, please advise where something looks "off": 1. User clicks Google OAuth link and does the OAuth "dance" with Google in a popup. 2. Google OAuth redirects to my redirect_url 3. At my redirect URL, I create a token and set it as a cookie, then redirect to my authenticated home route *with a 302 response and a "location" header. (Should I be using Response.redirect("/") here instead of a 302? ...
Next