Deno

D

Deno

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

Join

cant set up vscode language server

i got some error from the initialization of the language server: ```Starting Deno language server... version: 1.36.4 (release, x86_64-pc-windows-msvc) executable: D:\Deno\deno.EXE Connected to "Visual Studio Code" 1.86.0...

Choose level for std logger

I have some loggers configured using the setup function from std/log. This way levels are hard-coded. I would like to be able to pass a --debug option to my script to activate the DEBUG level, otherwise use INFO and above. Is it possible to achieve this using std/log? If not, what are other libs you can recommend instead?...

folks running into this wiered issue on deploythe deployment is continuously failing

folks running into this wiered issue on deploy the deployment is continuously failing was working fine untill last evening any help or any articles i can refer on how to debug we have been using deno.deploy for a month now...

Problem with the npm package and vite/esbuild

https://github.com/denoland/denokv/issues/64 Is there a solution to this problem? Has anyone been able to build denokv with node, vite?...

How to send an enum value from Rust to Deno

Hello there 👋 I am quite a beginner to FFI and I am not sure which resources to read to learn more about it in Rust. My problem: I got two enums MyEvent and MySubEvent. ```rust #[repr(C)]...

Dependency injection deno deploy

Does anyone know a Decency Injection library or container that works on deno deploy?

Fetch request from own server

```js try { const response = await fetch('.../ping',...

Service keep restarting

Two GitHub projects, prod and customer are created using Deno for data syncing. Both projects are hosted in same server instance but different folders. Both projects set schedule run where prod run from 2am till 11pm and customer run on specific hour, 7am and 5pm. Prod schedule run is running fine but customer service keep restarting and caused the schedule run not working. ...

Run `nvm` using Deno.Command

Hello, I am trying to run nvm from a Deno script using Deno.Command. ```ts new Deno.Command('nvm', { args: ['use'], stderr: 'inherit',...

Creating custom GitHub Action using Deno

Hey, I am currently trying to develop my first own custom GitHub Action. I have some trouble setting up my environment. I really don't want to use Node and try to stick to Deno, but this is easier said than done. Can someone help me setting a basic action up? Thanks! This is my current repo where I try to set everything up: https://github.com/Datapack-Registry/minecraft-manifest...

how to avoid deprecation warnings in compiled binaries

```sh $ pkgx --version warning: Use of deprecated "Deno.stderr.rid" API. This API will be removed in Deno 2. Run again with DENO_VERBOSE_WARNINGS=1 to get more details. warning: Use of deprecated "Deno.isatty()" API. This API will be removed in Deno 2. Run again with DENO_VERBOSE_WARNINGS=1 to get more details. warning: Use of deprecated "Deno.stdin.rid" API. This API will be removed in Deno 2. Run again with DENO_VERBOSE_WARNINGS=1 to get more details....

Deno compile with "--no-terminal" don't work

I'm trying to compile a very simple file named main.ts
await Deno.writeTextFile('test.txt', 'Hello World');
await Deno.writeTextFile('test.txt', 'Hello World');
...

Deployment ID not available after API deployment

Hi - i'm calling the /deployments endpoint after creating a new project: ${API}/projects/${project.id}/deployments But the output I get is not consistent with the API docs here: https://apidocs.deno.com/#post-/projects/-projectId-/deployments...

`Request` body reading functions: possible error types

This has a section saying:
⚠️ Be aware that the req.text() call can fail if the user hangs up the connection before the body is fully received. Make sure to handle this case. Do note this can happen in all methods that read from the request body, such as req.json(), req.formData(), req.arrayBuffer(), req.body.getReader().read(), req.body.pipeTo(), etc.
I was wondering exactly which error gets thrown in this situation. Is it a NetworkError, or a TypeError, etc. I couldn't find any documentation (even in the spec) regarding what errors these body reading functions can throw. I have a use case that requires knowing exactly why the function failed....

How to call a JS function from Rust?

Hi, I'd like to call a JS function from Rust but I can't seem to find an example that does so. I got this far with the examples and blog tutorials. ```javascript...

View code in Subhosting project

Hi there - i'm using the API to create a new project and deployment with Subhosting. Just wondering how to actually see that code that I've pushed? I was thinking that i'd be able to open the project via the "Edit with Playground" option... but that doesn't show up for projects created with the deployments API it seems?

Stop deno deploy instance

Hi everyone, I just deployed my first test deno project on deno deploy. Now I'm wondering how to stop that instance. Can't find anything on dash.deno.com.

How can I flush a stream to a response?

I'm trying to stream a response but it appears that data is only sent after either a newline is written or some buffer is filled. Is there a way to manually flush the buffer? To repro, run this with --allow-net, then observe the difference in behavior between curl http://127.0.0.1:8000/%0a and curl http://127.0.0.1:8000/%20. ```js const encoder = new TextEncoder();...

Hoping for a clean way to get an array of filenames in directory

Trying to do something like this:
const files = Deno.readDirSync(Deno.cwd()).map(x => x.name);
const files = Deno.readDirSync(Deno.cwd()).map(x => x.name);
But I get this:...