Deno

D

Deno

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

Join

Import local typescript file so both Deno (LSP) and TS work?

Seems like Deno wants the import to end with .ts while TS wants no file extension. Is there any way to change either of them to accept the other?...

sub sub domain on deno.dev

Is it possible to create a sub sub domain with deno.dev, example, invite.my-bot.deno.dev, support.my-bot.deno.dev, discord.my-bot.deno.dev ?

Can I run an express application under deno

Or do I need to port it to Oak? Is there an "express -> oak" cheatsheet ?...

how to cli run node modules without --compat

So deno run --compat has now been removed in favor of npm: specifiers https://deno.com/blog/v1.26#--compat-mode-removed. I am sure this consolidates a lot of code, but I am unsure how I can gain back certain functionality. For instance, I could run a solidjs template out of the box from deno with compat like so: deno run --compat --unstable --allow-env --allow-read --allow-run --allow-net node_modules/.bin/vite dev Using npm specifiers, I dont seem to have the same capabilities. deno run --compat --unstable --allow-env --allow-read --allow-run npm:vite...

mongodb indexes

Is there something for deno that supports created indexes for mongodb?

Intellisense on an import not working, works for friend

I cannot for the life of me get import * as bsdeno from "https://raw.githubusercontent.com/KivalEvan/BeatSaber-Deno/main/types/beatmap/v3/mod.ts" to have intellisense. I try typing const b: bsdeno. and nothing shows up. I tried restarting TS and deno language servers, tried restarting VSC, tried updating deno, and restarting my computer. No dice.. my friend is using the exact same import and intellisense is working fine....
me

repl

is there any way to quote a carriage return in REPL so it doesn't end the parser?

Native extensions for Deno?

Does something like n-api exist for deno? Can't find it in the manual

Emacs

Is anyone using Dino with Emacs, either under TIDE or under LSP?

Where the Typescript Header files cached by Dino on MacOS

Is there something that describes where all the different things get squirreled away?

?? lint doesn't seem to catch type errors ??

why am not getting a type checking error? ``` let aaa: string = 151;...

How to create a broadcast system with streams and oak?

i'm trying to create a simple "web-radio" to learn more about streams with deno and oak. i'm stuck on the part that oak read a stream and send to response let me show you some code ```ts // nextSong() {}...

Deno.serveTls with self signed certificate

i try to create a webserver but i cannot use self signed certificates, how can i solve this ? ```javascript deno run -A --unsafely-ignore-certificate-errors webserver.js DANGER: TLS certificate validation is disabled for all hostnames HTTP webserver running. Access it at: http://localhost:8080/...

ReadableStream to JSON

i cant seem to get a JSON out of the request.body i attached pictures for the front end JS request code and back end Deno attempt of get the JSON obviously i am a noob so any help is greatly appreciated...

distinguis `netERR_CONNECTION_TIMED_OUT` from `netERR_CERT_AUTHORITY_INVALID`

i get net::ERR_CERT_AUTHORITY_INVALID because i use self signed certs on the domain localhost now i want to check if the net::ERR_CERT_AUTHORITY_INVALID occurs, and if so the user should receive a message, but how can i distingish form other network errors like if the server is down fetch would throw a net::ERR_CONNECTION_REFUSED when i catch the fetch error , all i get is: ```...

Command doesn't work in deno task but works outside of deno task

The command in question:
(find . -name '*.js'; find . -name '*.as') | grep -v bundle | xargs wc -l | sort
(find . -name '*.js'; find . -name '*.as') | grep -v bundle | xargs wc -l | sort
Run it in Terminal.app, it works. Run it in Deno, it freezes! This changes when I remove the () to join two commands together....

How do I patch a std api?

Hello. This person posted in this command that they "patched" the vm.isContext function to return false in order to get the node:jsdom library to work: https://github.com/denoland/fresh/issues/427#issuecomment-1251918545 I am wondering how they did that....

Monkey patch Broadcast Channel to send messages to current context

Essentially what I want to do is be able to connect to new BroadcastChannel("test_channel"); which I in the same context want to post messages to and still be able to recieve them. So if my pretty little drawing helps: ``` |---same javascript context----------|...

Dynamically imported module evaluation is still pending

I'm very confused on the error i put as the title because in my program i'm trying to just import some files in a directory and i get this really not self explainatory error, does somebody know anything? Thanks 😁 Code: ```ts const comuneEventDir = path.resolve(__dirname, './events'); const eventDir = Deno.readDirSync(comuneEventDir);...

How to setup CORS with serve? I get 403 forbidden.

I've setup the following headers (OPTIONS response): ``` new Response(null, { status: 204, headers: { 'Access-Control-Allow-Origin': '', 'Access-Control-Allow-Methods': 'GET, POST, OPTIONS', 'Access-Control-Allow-Headers': '' }...