Deno

D

Deno

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

Join

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': '' }...

Dynamic npm imports don't work

Hey there. It looks like dynamic imports don't work with npm specifiers. For example: ``` await import("npm:react")...

Vue 3 and deno

So I'm not much of a web dev myself cuz I don't really like to build websites. But now I've found vue and I'm in love with it. Only drawback is that I need to use node. Does anyone know if it's possible to use vue with deno? And if so what are the current drawbacks?...

Unable to make local session persistence with Firebase Auth on Deno Fresh

Hello I'm running a basic app for testing firebase auth. My implementation is as follows: - The firebase app is initialized in ~/back/firebase.ts using env variables for the configuration values. - The sign-in functionality is in ~/routes/api/signin, The POST method executes the signin using firebase auth and redirects to /profile. The GET method returns the current session for fetching....

newbie help on deploying first project to deno

I asked on deno github and was told to ask on discord: https://github.com/denoland/deno/discussions/16039 I wonder if someone could help me on this, im trying to deploy a mongodb nodejs project...

Custom fonts

What's the most straightforward way to supply my own fonts (.woff/.woff2) to use with Fresh and twind? Can't seem to get https://twind.dev/handbook/configuration.html#custom-fonts-and-imports to work

How to exclude vendor directory from test coverage?

https://deno.land/manual@v1.25.4/testing/coverage Here it says by default it will exclude test\.(ts|tsx|mts|js|mjs|jsx|cjs|cts) and only include specifiers matching ^file:. If I wanted to keep the current behavior but also exclude my vendor directory how would I do that? Before this I tried excluding them from codecov by using the following codecov.yml in my .github directory but it didn't work and still shows coverage for my vendor directory. ```yml comment: false...

How exactly do import maps work?

My import map works but I don't understand how!
"/": "./src/",
"./": "./",
"/": "./src/",
"./": "./",
If I import /a/b/c.js it imports from ./src/a/b/c.js. I like this....

does not provide an export named... module import

does anybody know whats going on, when i reload my page only sometimes i get this message :
The requested module './mymod.module.js' does not provide an export named 'mymod'
The requested module './mymod.module.js' does not provide an export named 'mymod'
when i import like this ...