Deno

D

Deno

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

Join

authentication within @kubernetes/client-node is not working as expected

i tried to us deno2 and the @kubernetes/client-node to connect to an local kubernetes but i wasnt able to authenticate. i always ended up with an anonymous user. i tried different users and configs in the .kube/config and also with the programatic way. i could not find any problems with code and kubernetes-config so i switched back to nodejs and it worked as expected. Any ideas on that? Not sure if it is a problem with the library or deno ......

assertThrows with async function

I'm using assertThrows with an async function and it doesn't seem to work no matter what I try. Any clues? The error is always thrown, but the test still fails.
No description

tsconfig files alternative

I have managed to get most things set up I am still not able to get the "property viem does not exist on type HardhatRuntimeEnvironment" In node. Adding the "hardhat.config.ts" file to the 'files' option in tsconfig.json fixed it. Any alternatives in deno?...

Ubuntu: Failed to install completions for bash

I used the curl command from the Deno installation page for my fresh Ubuntu install, and I am being met with "warning: Failed to install completions for bash: PermissionDenied: Permission denied (os error 13): mkdir '/usr/local/etc/bash_completion.d' Any ideas why?...

`Deno run` command with permission flags not working inside container

I'm encountering an issue with running a Deno script inside a container (deno and chromium installed). When I execute the following command with specific permission flags: deno run --allow-read--allow-env --allow-write --allow-run="/usr/bin/chromium" --allow-net /test/index.ts it results in a timeout error. I've tried using -A (which grants all permissions) but it leads to the same error. ...

kv-oauth environment secrets with GitHub

I'm using the kv-oauth, https://github.com/denoland/deno_kv_oauth, module and I have it working locally. However, because Deno Deploy is using GitHub Actions, I can't set environment variables that start with "GITHUB_" and the module requires that exact namespace. Has anyone else encountered this? Or am I doing something completely wrong. This is my kv-oauth plugin that I cribbed from the docs. https://github.com/pchinjr/tillage/blob/main/plugins/kv_oauth.ts Thanks so much!

Run Fresh in subfolder with root deno.json

I'm using Fresh in a project where I have a big pile of other code in a separate folder. It works running the project if I have the deno.json file in the Fresh folder, but then formatting etc won't apply to code in the other folder. Considering this, I am trying to get workspaces working, but I'm kind of stuck. If I make a root file and try to include Fresh as a workspace, the imports in it then fails due to not having been prefixed with ./ or ../, if I move the imports to the root deno.json I get an error that the Fresh deno.json requires imports to be in there to run at all, but then those would override the ones in the root. I'm getting very confused by all of this. Is it even possible to have a Fresh instance as a workspace folder? I'm basically looking to do the below, and I'm struggling to keep my sanity:...

Create SvelteKit project with Deno

Hey, how do I create SvelteKit project with Deno? Docs recommends this command: npx sv create myapp How does a Deno command doing this looks like?...

install.ps1

yes im that dumbаss

Navigating back after interacting with a Partial

I've noticed after interacting with a Partial that it updates the url, which is fine, however navigating back displays the entire Partial as the content of the page instead of updating in place as you would expect. This can be seen on the Fresh homepage with the recipe example. Click on a few of the recipes then go back using the browser and you'll be navigated to the contents of the partial. I don't know if this is a bug or if there is a way around this?...
No description

Deno 2.0: Deno.write is not a function

I'm trying to use a 3rd party package with Deno 2 and get this error: ```error: Uncaught (in promise) TypeError: Deno.write is not a function await Deno.write(this.writer.rid, headers); ^...

defineComponent is not defined in Vue app

I'm moving a VUE project to Deno from NPM. I can't figure why, but I have troubles with import { defineComponent } from 'vue' My package.json is ```json...

Raspberry Pi GPIO via Deno

Does anyone have experience with controlling Rasperry Pi GPIO via Deno?

Tags in lint config

What effect does tags attribute in lint configuration specified in deno.json have?

Deno workspaces and Fresh, a viable combination?

Hello! I'm attempting to port an existing project to Deno and Fresh. I'm still working on the initial setup, and I have a structure like this: ``` / ├── deno.json ├── server/...

Use ES Lint, Jest, Prettier configs with deno

I'm using some published ES Lint, Prettier, Jest configs for Salesforce LWCs provided by Salesforce. Is there a way to leverage these configs with deno lint, deno format, deno test commands? I don't see config options for this in the documentation.

How I can use `npx create-next-app -e with-supabase` with deno cli??

Guys please help, I self taught and really don't understand what I missing, already checked the docs but there is no manual on what syntax to use for flags
No description

Deno + Vite + React (JS): create-vite-extra not working

Trying to use create-vite-extra with deno-react template. TS version works perfectly. JS version fails with "createRoot is not a function" right out of the starter project with zero edits. All the plugins and dependencies are installed. Not sure what the issue is.

pnpm -like experience

Hello! I'm experimenting with switching from node to deno for the obvious DX benefits but I'm running into a few difficulties. I use pnpm workspaces extensively, even on smaller projects, but some of my projects have dozens of packages. pnpm make this very pleasant by having a bunch of functionality that works nicely with worskapce. - workspace packages can be defined using a glob pattern....