Deno

D

Deno

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

Join

How can I change the human language used by the LSP?

Hi team. I'm using Deno and VSCode. The errors and warnings reported by the LSP are marked in English. Previously, it respected my system's locale, but that is no longer the case. My first instinct was to change the typescript human language setting by changing the locale like this in my VSCode config.
"typescript.locale": "es"
"typescript.locale": "es"
...

Can non-TS artefacts (images, MD files, etc.) be added to the "deno build" bundle?

Is there a way to add non-TS artifacts (images, MD-files, etc.) to the "deno build" bundle?

Help with FFI strings

I've been testing with the deno FFI to see if it's powerful enough to leverage the power of other languages into Deno. This however has been very unfruitful as FFI documentations seems to be "everywhere" when it comes to types, take for example anything that returns a char*. There are very few hints on how is one supposed to handle such returns. I was working with a function similar to this:...

deno fmt doesn't work properly using Visual Studio Code and WSL2

I am using: - Visual Studio Code 1.91.1 - Deno extension (in WSL: UBUNTU) v3.38.0 - WSL extension v0.88.2 - Deno 1.45.3...
No description

Compiling for use on ARM

I'm trying to use the rust deno crate on ARM linux, so I need to compile it for that. I'm trying my hardest to compile for arm linux on an x64 windows machine (yes i know). So I'm using WSL, and trying to compile rustyV8. Currently my setup is the following: i have: ```...

Renders in dev mode (locally) but not on Deno Deploy

I have this app here: https://github.com/angeldollface/angeldollface.dev When I run it locally it works fine. When I access it on "angeldollface.dev", though. I see no cube. And the following errors:...
No description

"invalid HTTP version parsed" error in proxy environmnet

Hi, now I installed deno on Ubuntu 22.04 and run deno upgrade then following error was happened. Could you let me know workaround if possible? ``` $ deno upgrade Looking up latest version...

Difference between "deno test" and "VSCode Runner UI"

Hello. When using the deno test command I'm getting some failures (What is not expected). ``` FAILURES ...
No description

Weird behaviour with deno autocomplete

I thought it was because of my terminal so I uninstalled deno and re-installed it with cargo and I have this behaviour again. When I start typing deno run for example, if I use tab to autocomplete with a local file, I get this and it breaks the command line. I don't know if it's a known issue or if it's related to my configuration but I didn't experience that on older versions of Deno 🤔
No description

Fresh - Error while running deno run on the built _fresh directory

Hi, I installed the latest version of Deno yesterday on Manjaro using the install.sh script. I then created a fresh (haha) fresh project. I noticed that the cli task was not happy because it uses the --unstable flag which is not valid anymore. Then I used the build task that successfully created a _fresh folder, but when I tried deno run -A _fresh/main.js I got the following error : ``` error: Uncaught (in promise) ReferenceError: history is not defined at file:///home/stephane/deno/fresh-project/_fresh/main.js:1:7893...

--watch flag doesn't restart on file creation

How can I trigger Deno to restart when a new file is added? The deno run --watch ... command only seems to trigger when a file is modified or deleted but not when a new file is created. My workaround currently is to use Deno.watchFs(".") to detect file creation and then modify an existing file which triggers the process to restart. This isn't ideal and it would be great if --watch would also restart on file creation....

Since Upgrade DENO, compile fails.

Deno fails when I complie. A month ago no shows that error in console. It's break....
No description

Enabling labels to show up in error messages (WebGPU)

Hi! I was wondering if there is a way to enable validation error messages to include the label attribute of a WebGPU object. For example: I might get the error message Device::create_texture error: Texture descriptor mip level count 10 is invalid, maximum allowed is 8. I think it would be helpful if it indicated the label that was included in the TextureDescriptor when creating the texture.

Changing a projects deployment from local cli to a github branch based deployment

When I did [what I described in the title] the project startup wouldn't use the existing kv instance, instead it seemed to give me a new instance. Thankfully reverting back to deployctl based deployment got me back on my old data (it's backed up to s3 as well so no worries there) but I was wondering if this was a known issue (or intended), or if there was some way for me to ensure that I can switch to github deployments without migrating data. Maybe migrating data between kv instances is easier than i realize as well and I just haven't gotten that far, either way any helpful nudges are appreciated 🙂 In case anyone is interested in reproducing this scenario: - create deno deployment that saves some data - deploy it manually via cli...

mkdirsync is throwing an exception that can't be caught?

This code used to work, so I don't know what changed. export default { validateEnvironment()...

Demo for Desktop App

Does anyone have experience in developing desktop applications? Webiew and WebUi don't seem to be ready yet. Also, the flag "--no-teriminal" does not work....

Memory leak

I have this function to extract the information on the battery status of Windows using Power Shell, but I could notice that while periodically executing the function the ram memory usage increased, so it is possible that I am doing something wrong and causing this or it may be a bug in deno? ``typescript export async function getBatteryInfo(): Promise<BatteryInfo> { const command = ...

How to get source code from packages used in Helix editor?

I am using Helix with Deno LSP and everything works except go to definition for third party packages. I just get an empty buffer. In node I can the source code which I can then navigate. Anyone knows a solution for this?

What is the best way to find the specific npm package available on Deno?

I'm currently exploring how to utilize npm packages within my Deno projects. Given Deno's unique module system and its differences from Node.js, I'm trying to find the most efficient method to identify npm packages that are compatible with Deno. What are the best practices or tools I should use to search for npm packages that work with Deno? Any guidance or experiences you could share would be greatly appreciated!
Next