Deno

D

Deno

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

Join

regex pattern in rust

I need help with regex pattern making. lets say there are some files with .md but i should not match .skip.md Help me with this negations pattern....

Module not found error when importing plugin islands

I'm trying to add islands to my plugin so that they "will treat them the same way as if they had been placed inside the islands/ directory." according to the docs (https://fresh.deno.dev/docs/concepts/plugins#islands). But when I try to import my island with: import Chiplist from '@/islands/Chiplist.tsx'; I get a "Module not found" error. Any ideas on why would be appreciated. This is how I'm adding the islands to my plugin: ```ts...

location

Can the deployment location of deno be changed manually?

how to "slim down" deno_core crate

for reasons too complex to get into, i'm bundling deno_core with my project to parse some JS. I only need very basic JS funcionality: if, switch, objects, arrays, and functions. the only "standard library" function i need is parseInt, but it's not the end of the world if i have to implement it myself. is it possible to trim deno_core down to only include the very basic stuff? thanks!

Deno CLI Broken

Anytime I attempt to run the deno CLI the arrow keys get stuck and I cannot make a selection. I have tried this on two separate machines, so I know it's not an environment issue. Here is the command I'm running: ```...

How to install a local jsr library on deno and nodejs?

I'm developing a JSR library, but I want to taste it locally on a web framework

should `deno lint` work without deno.json?

I have a file index.js with the following code var foo = 'bar …obviously broken. Running deno lint reports 'checked two files' but no error is given. running deno fmt fixes the file…which is neat…but I want to fail a build if the lint fails.

Sometimes a weird error happens when deno is downloading dependencies

Hello! I have seen some people (including myself) encountering this error after updating deps in deno.json then running deno run. Import 'https://registry-staging.deno.com/@deno/cache-dir/meta.json' failed: error sending request for url (https://registry-staging.deno.com/@deno/cache-dir/meta.json): error trying to connect: dns error: Unknown host (os error 11001) The error seem to go away if you try to run it a few times but... I dont really understand what is causing it. Do any of you guys know what could be happening?...

Windows named pipes

@Deno AI Helper Give me an example of how to use Windows named pipes in Deno without resorting to Node's child_process

How do I see which ops are registered?

I am trying to understand how the deno_core::op2 macro works. I used deno_runtime back in September 2021 and I remember that I could console.log Deno[Deno.internal].core.ops to see which ops are registered. Back in 2021 I read the deno CLI code and in my own project copied the setup of MainWorker because I wanted setTimeout. Now in 2024 I tried to upgrade the versions of deno_runtime to 0.272 and ran into the limitations of my knowledge. Right now I see that Deno.core.ops exists if you construct a JsRuntime. And I can use Object.getOwnPropertyNames to print out a list of ops to verify that my rust function ended up inside Deno.core.ops...

Deno compile not able to create files?

I want to create a simple CLI for a colleague at work that outputs a CSV file but I cannot seem to get Deno to create a file, even with the simplest of tests. When I run this normally using Deno run -A index.ts it will work as intended but when compiled and run through the executable it will run successfully but no file is created. Target OS: Windows...

Ran all install commands and now getting errors

I noticed that deno upgrade returns:
error: This deno was built without the "upgrade" feature. Please upgrade using the installation method originally used to install Deno.
This message is in cli/main.rs: https://deno.land/x/deno@v1.41.0/cli/main.rs?source=...

vscode run Deno: Initialize Workspace & Deno: Enable still no joy

I have installed deno and it works on my macos terminal. I exported it to my $PATH. I have selected my workspace and ran Deno: Initialize Workspace Configuration and also Deno: Enable If I also run Deno: Info in the command pallete it pops up the deno version However, I cannot get the hello world to run in the vscode terminal...

How do you use Rollup with JSR or the npm: prefix?

I noticed that when JSR was originally advertised it would support Rollup. Is there an example how to do that, or use Rollup with the npm: prefix? I want to transform and bundle Lit custom elements containing code annotated with decorators.

Send request (fetch) via a specific network interface

If a box has multiple network interfaces with their API addresses, how to choose a particular one to send http requests? And also to open web socket tcp connection.

Using enablePaths in nevim?

Hi, I'm working on a project that usage both node and Deno (for different reasons) and this is working great in vcode with the enablePaths config! But some of my colleagues are using neovim and we don't seam to find a correspondent config value for neovim. Does it exist? And how to we configure it in such case? Thanks!...

Microservices, best practices

Anyone know some good resources for best practices and guidelines when developing microservices? Mostly interested in TypeScript/AWS but also tips in general.

Partial with Forms

I'm currently working in a quiz-like app. I want to make 2 states, not answered and answered, which replace each other. I'll see a quiz, then fill the answer, next get the solution, and finally continue to the next quiz. I've seen that we may achieve this by: https://deno.com/blog/fresh-1.6#partials-with-forms ...

Warning: Not implemented: ClientRequest.options.createConnection

Using Deno with the npm @twurple/x packages, the warning comes up when you start an eventsub listener, once for most of the subscriptions. Basic example on how to do that in the lib docs: https://twurple.js.org/docs/getting-data/eventsub/listener-setup.html (using websockets, which is also easier) Rarely using github and can't even login right now anyway, so maybe someone else can do that open an issue? Edit: As far as I can tell, everything still seems to work anyway, though....

JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.

Hate to raise this issue again. VSCode updated today, and my project which hasn't had any issues in the past month now gets this error consistently. I've tried all the different flavors of fixing to no avail. Has anyone had this issue and successfully resolved it? I'm have a Fresh v1.6.8 project using preact.