Deno

D

Deno

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

Join

wich version i need to use of deno webview2 modules?

I want to use webview2 bindings with deno, and I found three different versions, option 2 seemed to me the most ideal but I had to look for other bindings because of the long start time, wrong ipc binding etc., option 1 doesn't have the features I want (like fullscren borderless window). Also, how do I reflect the always on top feature to webvew, when I do, it makes the cmd screen always on top https://github.com/webview/webview_deno https://github.com/zephraph/webview...

Using something like environment variables in fresh🍋

Is there anything I could use to use different (environment) variables in fresh? It is sort of implied in deno.json already: ```json "start": "deno run -A --watch=static/,routes/ dev.ts", "build": "deno run -A dev.ts build"...

migrate node to deno

easiest way to migrate node application to deno app

Jsr modules with package.json

I noticed that if I have a package.json my project doesn't see the jsr deps in deno.json

Uncaught (in promise) TypeError: Relative import path "@payloadcms/next/withPayload" not prefixed

Trying to deno-ify my payloadcms project, and I'm facing import issues related to deno.json. ```json { "name": "@project/backend",...

Deno + Vite + devServer (SSR) issue with missing symbol

This has been a deal breaker for us to consider Deno for a new large app, so I thought I'd share a minimal reproduction so we can get further: https://github.com/soundstep/deno-vite-ssr-playground/tree/deno-vite-plugin?tab=readme-ov-file#known-issues See the readme for usage and issue....

When to use deno add compared to import with a prefix?

As the title says, I can import like this:
import { parse } from "jsr:@std/csv/parse";
import { parse } from "jsr:@std/csv/parse";
...

on deno fresh or other deno frontend it takes at least 6 seconds for changes in the code to show up

whenever I change a component, layout, text etc it takes a lot more time to show up in localhost than when I use npm. Am I missing some obvious thing to do or this is just how it works? >.>...

deno+vite+tailwind

https://github.com/bpmooch/deno-vite-template I am having issues using tailwind with a deno+vite template. I created a github repository with a small reproduction of the issue. make will run deno run -A --node-modules-dir npm:vite. I get an error when running that command, complaining about the vite.config.ts. Has anyone gotten deno + vite + tailwind working?...

Is there any deno2+vue3 sample project?

Excuse me, is there a sample project for deno and vue as I won't be able to configure it after switching over, so thought I'd ask for help, thanks a lot!

The requested module 'npm:@jest/globals' does not provide an export named 'describe'

I am doing some exercies on exercism in the Typescript track, but I want to run my solutions locally on my machine using deno. So I have a folder, and in it I have two files (two-fer.ts and two-fer.test.ts): ...

NotSupported: LocalStorage is not supported in this context.

I get the above error when trying access the localStorage API from my compiled .exe. I'm using the exact same compile parameters I have saved in a VS Code task before, which used to work.

How to obfuscate project before compile it ?

Hello, is it possible to obfuscate the code before compile it ? The code is still visible if you open the exe file with notepad/vscode...

Bundling node-tree-sitter

Hello there! I'm working on a language server written in Deno TS. I'd like to bundle it with node-tree-sitter, and I'm using esbuild as the docs recommend., but node-tree-sitter doesn't bundle nicely. https://github.com/bennypowers/design-tokens-language-server/issues/1#issuecomment-2776935304 If you have some ideas how I might work around this, I'd appreciate your input. Maybe with a dynamic import and --include?...

How to load fonts in /static?

Using Fresh with tailwind By doing ```css @font-face {...

How do i correctly create local package/package.json - that can be used by locally running deno app?

The tl;dr is that I have a sveltekit app and a deno app, and they both share code. Everything seems to work on the CLI level, but I cannot get it to work on the LSP level (vscode) I think? I can't tell if it's my lack of understanding of how deno expects imported npm packages that are local - or if that's even possible, or something else. I have put up a mock repo to show what I am trying to do, and I also creted an issue in github that shows some fix attempts that lead to extremem performance degredation from the deno lang server (i think at least) I'm trying to figure out how to structure a node package and what the package.json should look like in order to correctly be able to reference this package from a deno app using an import_map...

Install package provided from URL as `.tar.gz`

Some sites like https://github.com/stackblitz-labs/pkg.pr.new provide packages as tarballs. How can these be installed in a deno project? With npm, we can simply run npm i https://pkg.pr.new/<owner>/<repo>/<npm-package-name>@<pr-id> and the PR branch version of the package will be installed. Does deno have a way of handling this?...

Importing Tesseract.js

Hello! I am hoping to use tesseract.js to do OCR in my application. However on deno 2.2.6, when I try ``` Tesseract.recognize( 'https://tesseract.projectnaptha.com/img/eng_bw.png',...

How do I compute a cursor for kv.list?

I basically I want to list entries after a known key. I'm trying to implement this function: function getEvents(afterEventId: string) { const entries = db.list({ prefix: ["events"] }, { cursor: ??? } ...

deno.json glob exports

I am using a monorepo with multiple projects. I would like to use specific files from package @namespace/toolbox in package @namespace/project. In package toolbox, I have the following deno.jsonc: ```json...