Deno

D

Deno

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

Join

ImportTypeScript API + get value of `compilerOptions` with default options from `tsconfig.json`?

Hello, I'm trying to figure out the proper way to do a few things: 1. What's the correct way to import the TypeScript API in Deno? At the moment, I'm importing from npm because I can't find any official TypeScript module in Deno. 2. What's the best way to read the compilerOptions tsconfig.json such that anything not set gets its default value? On a cursory glance, it would see like I can easily import the JSON, and I would feed it to convertCompilerOptionsFromJson, but I have no idea how to import, which is also why I'm asking 1....

How to override the version from a dependency of a project's dependency from npm

I'm currently using react-pdf as a dependency, react-pdf uses fontkit as a dependency, and fontkit uses the npm restructure library. restructure, on the other hand, broke fontkit, therefore I would like to replace the new restructure version with the old one, so I tried using Deno.json's imports map, and scopes as well. ```...

How to publish global types with JSR?

I was trying to republish my npm package with JSR via npm jsr package. It all went well with one exception. I did not find a way how to publish global types (declare namespace). In npm I can declare in package.json what file is responsible for types and then I can pack all generated types + the global definitions. But as JSR does this automatically I haven't find a way how to pass those global types. Is there a way around it now?

Caching results from API

Hi, I'm currently working on a project where I get data from an API (https://www.robotevents.com/api/v2), process the data, and return it to the browser. I was wondering about how I could cache the results from the API because if the website has let's say 5000 users then the API won't be able to handle all of those, so I want to cache the data somewhere and update it every 24 hours or so. Do I use something like Deno KV for this and then when the server get's a request it checks if data is already in that database and returns it. Also, how do I call the API every 24 hours? Thank you for your help....

INTERNAL_SERVER_ERROR_2 / 500 response code

Several clients concurrently reported INTERNAL_SERVER_ERROR_2 with a 500 error on requests to a deployed deno project. I can't find any mention of this error in docs and precious few on Google. Does anyone recognize this string?

My site seems to be under attack

I receive a large amount of request last night. Does this mean my site is under attack...?
No description

Deno drizzle-kit migrate:pg

I don't know if its drizzle error or Deno error... I saw path resolution problem, it is said C:Usersidip..., it should be C:\Users\bidip\. It looks like it is reading the \b as omitter or escape character....
No description

Does V8 engine eventloop/threading model conflict with rust?

hi, I am trying to embed deno's rusty_v8 into rust application. I am confused about the eventloop/threading model between v8 engine and rust. because js/ts has the async/await feature (which helps to avoid blocking IO/network, and other things), and v8 engine also has an eventloop itself. I think when v8 engine is running it's eventloop, it will cause rust main thread blocking? How should I do to make v8 and rust running together?...

How installing Silverbullet on deno

On the officle website of silverbullet they say we can install silver bullet on deno but i dont know how to do it can yo pls help me

implementing swagger in deno typescript with deno_swagger_doc on deno.land. it throws error.

error: Uncaught (in promise) Error: Cannot find module './isomorphic.node' var e = new Error("Cannot find module '" + id + "'"); ^ at _nullRequire (https://dev.jspm.io/npm:@jsdevtools/ono@7.1.3!cjs:179:11) at https://dev.jspm.io/npm:@jsdevtools/ono@7.1.3!cjs:189:27...

npm install -D equivalent

I want to use drizzle-kit. npm install -D drizzle-kit but don't know how to get it work in Deno....

Kill deno process tree

How would you kill a Deno process tree as in, force kill of Deno process and any of it's subprocesses? Deno.killappears to possibly leave subprocesses alive. Ideally using Deno.ChildProcess API, but I highly suspect it's not possible using the runtime API; I would also be happy with just a linux command I could run along with the PID! (I'm not that well versed with linux commands and process stuffs, so far I've been using killall deno which definitely works but would be nice to target only a specific process tree)...

What to do if they are attacking a project of mine?

Hello!, Yesterday I suffered an attack on one of my projects, they made 6 million requests in a very short time. Since I have the free plan, it will not cost me any money, I will only have to go a few weeks without sharing my projects. In my case it will remain a funny experience, but I have friends who do have payment plans because they need it for their businesses. ...
No description

Error Installing Deno using PowerShell

Hello, may I please ask for assistance in regards to installing Deno using PowerShell on VS Code. An error occurs when inputting this command: irm https://deno.land/install.ps1 | iex Thank you kindly....
No description

Subprocess

can someone help me how do i get to show Hello world in my terminal by using Deno.Commands () using echo

Problems using @apple/app-store-server-library, how do I debug?

Hi, I'm attempting to build out the backend of an IOS app on Supabase and want to be able to verify the purchase of in-app purchases using an edge function. I have a block of code working perfectly in nodejs on my local machine i.e.,
import { AppStoreServerAPIClient, Environment, SignedDataVerifier } from "@apple/app-store-server-library";
import { AppStoreServerAPIClient, Environment, SignedDataVerifier } from "@apple/app-store-server-library";
...

Is there an easy way to read tls certificate and key from a filesystem?

I do the following: ```js if (Deno.env.has("TLS_CERT_PATH") && Deno.env.has("TLS_PKEY_PATH")) { const tlsCert = Deno.readFileSync(Deno.env.get("TLS_CERT_PATH")); const tlsPkey = Deno.readFileSync(Deno.env.get("TLS_PKEY_PATH"));...

Partials in a redirect ???

Does anyone have any idea how i can redirect after login to a route with initialised partial: Example: This a-link would take you to the dashboard and fill the partial with overview html. ```cs...

How to troubleshoot runaway (100% CPU) deno process

Deno has been running a couple of websites rock solid for many months. But during last week or so I've had the server (using Deno.serve()) go unresponsive twice. That is, connection times out and I can see 100% CPU usage for the Deno process. No idea if it's a Deno bug, or bug in my code (like a blocking infinite loop or something). Thing is, I have no stacktrace, console.log output, or error logs to work with. I only know Deno process is stuck with something, using a lot of CPU and unable to serve requests (connection times out). Problem is I don't know where it is stuck. I do push new versions out every couple of days or so, as well as update deno to latest version regularly. Both deno and my own code has changed in this timeframe so I can't really say whether this problem is related to some version of Deno, or is it related to my userland code updates. ...