Deno

D

Deno

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

Join
Erkkuleo
Erkkuleo5/9/2024

[resolved] deployctl installation problem: Permission denied

Hey, I'm having trouble with installinf deno deploy. I'm using the following command: deno install -Arf https://deno.land/x/deploy/deployctl.ts and it gives me: error: Permission denied (os error 13)...
lukeed
lukeed5/8/2024

deno w/ svelte kit

hey all, so deno mostly works with svelte kit~! its dev and build commands work (so long as youre not prerendering @ build), but the main blocker right now is actually that Deno doesn't pick up the types that SK generates on the fly. Any ideas or suggestions to get that working?
babakfp
babakfp5/8/2024

How to delete all data of a `Deno.Kv` DB file?

Hi 👋 Is there a way to delete all content inside a db file in openKv? Doing this doesn't work: ```ts...
NestarZ
NestarZ5/8/2024

Like import.meta.resolve("./bla/bla") but so that it return me the relative cwd path

How using Deno to do something like import.meta.resolve("./bla/bla") but so that it return me the relative path relative to the current working directory ?
babakfp
babakfp5/8/2024

How to prevent `deno add` from adding `^` to package version?

Hi 👋 Is there a one time option like PNPM? So I can set it once for all and not have to deal with it every time. I don't understand why every package manager adds that character. You may install a different version of a package without knowing it and introduce bugs into your project because some packages may have breaking changes in their minor version updates....
Thomas
Thomas5/7/2024

reflect-metadata on Deno Deploy not working?

Is there a reason why no reflect-metadata-libs work on deno deploy? I have tried the following: - https://www.npmjs.com/package/@abraham/reflection - https://deno.land/x/reflect_metadata@v0.1.12-2...
Auke
Auke5/7/2024

`deno run` not returning

Hi - I have added the following code to my javascript file, and for some reason the code still executes fine, but it doesn't return anymore, leaving deno running and I have to ctrl-c out of it. ```js if ("Deno" in window) { // Import paper_js, as it is not loaded by the index.html script include...
shultz
shultz5/7/2024

npm specifier not found in LSP only, and so no types for certain imports

It seems to be unfixable (via cache reload, deno info, reboot, rm -rf ~/.cache/deno, ext.), so right now the LSP is unusable and I'm writing JS with no types. deno run, deno check, deno info and deno cache --reload, all run without error and don't complain about the missing specifier like in the LSP. e.g. importing drizzle-orm and no types are available. output I see when I run cache and it's dependencies:
Could not set npm package requirements. Error getting response at https://registry.npmjs.org/@types/node for package "@types/node": An npm specifier not found in cache: "@types/node", --cached-only is specified.
Could not set npm package requirements. Error getting response at https://registry.npmjs.org/@types/node for package "@types/node": An npm specifier not found in cache: "@types/node", --cached-only is specified.
...
No description
capo_greco
capo_greco5/6/2024

localhost workflow for BroadcastChannel?

How would one go about setting up a (multiple?) localhost workflow for implementing / testing BroadcastChannel things?
texasranger
texasranger5/5/2024

jsxImportSourceTypes not working for React

I've tried doing this: ``` "jsx": "react-jsx", "jsxImportSource": "react",...
DenoCitizen
DenoCitizen5/5/2024

Take data from a ts file to display it in the html

How can I take data from a ts file to display it in the html? Like a search bar. Is it possible to do this in Deno Fresh? Thanks in advance...
hmt
hmt5/5/2024

https imports in vite project

I want to develop my svelteKit app in deno and need to add a SQLite-module. Doing it like this:
import { DB } from "https://deno.land/x/sqlite/mod.ts";
import { DB } from "https://deno.land/x/sqlite/mod.ts";
...
hmt
hmt5/5/2024

SvelteKit: Unable to load a local module for './$types'

The ./$types module resolves just fine in my .svelte files but not in .ts-routes. Any idea how to fix this?
dan.the.discloser
dan.the.discloser5/4/2024

what's the best tool set to use for testing react components in Deno?

Ideally something very fast for TDD.
ProPuke
ProPuke5/4/2024

Piping stdout from a ChildProcess while it's running

Is it possible in Deno to read from a ChildProcess's stdout while it is running (before it has completed)? I'm using deno.Command and .spawn() to create a ChildProcess.
If I then try reading from process.stdout.getReader() it does not return anything until the process has terminated and an output status is returned. ...
ivandpf
ivandpf5/3/2024

PHP to Javscript little code

```php if ($_SERVER["REQUEST_METHOD"] == "POST") { if (isset($_FILES["file"])) { $file= $_FILES["file"]; }...
anggoran
anggoran5/2/2024

SpeechRecognition is not found

There are other SpeechRecognition interfaces, but the main one isn't available.
No description
DNA
DNA5/2/2024

Ignoring `deno(redirect)` in vscode?

When deno extension in vscode is enabled, i get this warning, that my imported file was redirected. I know, that this is probably a bad practise, but this is what i want to have. So is it possible to just hide this squiggles? I couldn't really find anything in the extension's settings
No description
Cole
Cole5/2/2024

Adding a max runtime timeout to Deno JS execution

As the title states, I would like to be able to add a timeout to any JS code that I am executing in my deno_core JsRuntime in rust. I haven't been able to find any way to get this to work as all solutions seem to require that Deno yields the async runtime which it doesn't ever seem to do until it finishes. Any advice you could give or places you could point to would be extremely helpful, thanks!