Deno

D

Deno

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

Join

Hashbang with TS file (without .ts extension)

Hi y'all, I have a few convenience scripts written in Typescript for Deno that all have a wrapper script. I wanted to swap those for simple symplinks to the code, which in turn contains a Hashbang but hit a dead end, because deno seems to assume extensionless files are JS files. Is there a way to tell Deno in the comandline, that it is dealing with a typescript file? Or do I have to either use .ts for all my scripts or keep copying the same wrapper scripts again and again and again?

Astro + Deno - Remote Imports

First of all thanks a lot for the nice template, it looks great !! I followed the guide posted here https://deno.com/blog/astro-on-deno and now I'm trying to test the remote import feature https://deno.land/manual@v1.36.3/basics/modules#remote-import. Currently it only works in the astro.config.js file but once I want to use it on a page it wont work....

Debugging test in VSCode always breaks on line 54 of colors.ts

When debugging tests in VSCode the debugger always breaks on line 54 of colors.ts. This behavior is very annoying as I've set no breakpoints in that file. Is there a way to prevent this behavior?
No description

Building from `src` offline?

Hey guys! I'm new to Deno (and web dev as well to be honest), so could you help me here please. I'm making a site with the Lume (SSG for Deno), and there is the step when I need to build a site from src. It is all good when I'm connected to the internet, but when I'm turning if off — building process crushes: ```bash...

Any plan to fix Deno.listenTls() timing out a WebSocket connection?

Any plan to fix Deno.listenTls() timing out a WebSocket connection?
{code: 1001, reason: 'No response from ping frame.'}
{code: 1001, reason: 'No response from ping frame.'}
...

Playing sound from file

How can i play the sound from a local file using deno?

Deno with the --inspect-wait arg doesn't expose /json/protocol - should it?

I'm testing out connecting to a Deno process via the v8 inspector protocol: https://deno.land/manual@v1.36.2/basics/debugging_your_code and discovering that though it seems to work with Chrome and certain other tools, trying it with chrome-remote-interface https://github.com/cyrus-and/chrome-remote-interface says that it doesn't expose an endpoint at /json/protocol. I've tried Node, and it does expose an endpoint there and list its capabilities with JSON. Is this not part of the v8 protocol bu...

`deno test` and VSCode test runner are failing to run all test files

In my Fresh projects, I'm trying to run all my tests with a single command. This used to not be an issue, I would run deno test and all my puppeteer tests in all files would run in series. Issue #1: More recently, I think because of a Fresh update, when I run deno test the test runner only goes through 1 file. I have to comment out other files completely or delete them for more than 1 file's tests to go. I resorted to throwing all my tests into a single file, but that's really messy so i'm looking for a proper solution. Issue #2: I discovered that if I use Deno.test in my code instead of describe and it that I can use the VSCode test runner. However, the test runner breaks if my code uses the library zod. No error messages, it just doesn't run the test. It took a very long time to figure out Zod was the issue, but after much trial and error I'm 100% sure of it....
No description

Help on Deno deploy that fails

Hi all, I'm having an issue on Deno deploy that states as follow: 'Error: The deployment failed: Module not found "file:///src/core/errors/errors.ts".' This file is located locally in the project and has no issues. Furthemore the project itself has no 'npm specifiers' and no unsupported 'Deno fs' (as the doc says). ...

Deno console.log() all items of array

Hey how can I enable all of the output, so that Deno does not cut of items?
No description

Hey! i can't to download deno

HEY~ I am a Taiwanese people so my English not good but I have a question ...
No description

Closing a file

How do I close a file after opening and streaming it? My handler function code is as follows: ``` return new Promise( (grant) => {...

puppeteer makes script to hang for a while at the end

I am using npm:puppeteer in my script. Everything is working fine. But often the script hangs at the end of the exit. Is this normal with puppeteer? I think that some async op is leaking. But I am not sure if I made any mistake or it is coming from puppeteer. I do call browser.close() in a finally block....

In Fresh, how do I return a JSON response in a middleware?

In Fresh, how do I return a JSON response in a middleware?

get length for KV list via prefix?

Is there a fast way to get just the count of items for a prefix?

Property 'params' does not exist on type 'Context<State, Record<string, any>> ... what to do?

I want to access params in oak, but typescript complains. What can I do about that? Thanks....

What is the std library for making a guessing game like shown in rust?

```rust use std::io; fn main() { println!("Guess the number!");...

Data must be valid JSON

A simple project, after successful deployment, reports an error "Data must be valid JSON".
No description

FFI deno_bindgen, how to see build logs?

Hi, using deno_bindgen for rust, is there anyway i can view the build logs? --verbose or -v do not seem to work link: https://github.com/denoland/deno_bindgen Right now i suspect my code has some issue but i cannot see anything at all, it starts, does stuff and exits....

TypeError: str.split is not a function

Hey Gang. Im following along this tutorial: https://deno.com/blog/build-a-blog-with-fresh But I am running into some major issues. In the last step it tells me to use gfm (https://deno.land/x/gfm/mod.ts) to get the rendering markdown functioning. Like this: ...