Deno

D

Deno

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

Join

How to import qstash into deno edge function?

Hi, simple question, I think, but I can't figure out. I want to import this module into my deno edge function so I can use the Client and Receiver in some webhooks for background jobs: https://deno.land/x/upstash_qstash@v2.5.2 I can't get the import to work. Not sure if it requires an import map or I can just declare it at the top of the edge function file in typescript....

Deno Fresh: client side check dev or production

For my Deno Fresh app, I want to do a simple check from the client-side code to see whether it's in development mode or production deployed mode. Use case is: I want to point my API to my localhost if it's in development, otherwise point the API to production server. How can I do this in Deno Fresh?...

Deno is not defined

Is "Deno" supposed to be defined on the front-end client? I'm trying to get a simple app working using Fresh framework, but even on a fresh install of Fresh app, Deno is not defined in client, which causes a LOT of necessary Deno modules to not work (for example, "graphql-request"). Is this a bug on Deno? Or is there another way I'm suppose to do this?...

shebang and no file extension: how do I turn Typescript on?

I have scripts with a #!/usr/bin/env deno run shebang, but they execute as javascript —adding types lead to parsing errors. Can I enable typescript with a command line parameter to deno run?...

Why cannot use emoji in variable name?

The module's source code could not be parsed: Unexpected character '💿' at file:///Users/

caching known dependencies on devcontainer startup

👋 after setting up an ubuntu devcontainer with deno and the vscode extension installed, is it possible to cache the dependencies in import_map.json on startup? i've tried adding deno cache as a post* command and in Dockerfile but find that nothing happens as post* steps and Dockerfile errors with an unfound file or doesn't work from the correct directory: ```...

libp2p crypto error - Not implemented

Version: Deno 1.43.3 I'm trying libp2p on deno and i'm getting this error from the crypto package: Is there a way to solve this? like replacing the module in the importmap or something?...
No description

My Website hosting just stopped working randomly

I'm using qwik framework and deno deploy. My website was hosted just fine on www.morningharwood.com and randomly it stopped working w/o any config changes. error seems very weird: This site can’t be reachedCheck if there is a typo in www.morningharwood.com. If spelling is correct, try running Windows Network Diagnostics. DNS_PROBE_FINISHED_NXDOMAIN...

Deno package management questions.

I have a few questions regarding package management in Deno. 1. Here Deno documentation states that import maps are only applied to applications, and that library authors should prefer the deps.ts pattern. Contrarily, the jsr documentation specifies that a dependency manifest like the import map in the deno.json file can be used by a library. Does this mean that the deps.ts pattern is now obsolete?...

i have a rpi armv6 but i cant install deno. is it cause of compatibility issues

i have a rpi armv6 but i cant install deno. is it cause of compatibility issues

Postgres Deno Connection Pool Idle timeout

I am using NeonPostgres and connecting to the database in Deno using the following below and executing this way. This connection is running in a Discord bot using Discordeno. I am entirely ruling out local network setup however the discord bot itself never disconnects. So that brings me here. After a certain time frame that I haven't determined quite yet. Maybe 20 minutes or so? ```typescript import { Pool } from "https://deno.land/x/postgres@v0.19.3/mod.ts"; ...

Managing Test Scripts

How to manage multiple test scripts so they will be detected on the Test Explorer?

Websockets API with async processing (is there a better way?)

My Deno app has a websockets layer that receives "requests" from the websocket clients. The clients ask it to update data in the database, retrieve data, etc. similar to a REST api There will be 5-10 clients who will be sending a very large volume of requests. ...

deno_core as JS sandbox

(repost from genreal) Hi. I'm making a service where I let users run JS in a sandbox. I'm currently using the isolated-vm npm package. Would running deno_core be harder, better, faster, stronger? I don't need much and a know a bit of rust. Current implementation has no modules, but built in JS things like setTimeout, and async/await works. I also inject a custom fetch method. And I have a timeout....

Can you use deno fresh on deno deploy playground?/

@Deno AI Helper Can you use deno fresh on deno deploy playground?/

[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)...

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?

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

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 ?

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