Deno

D

Deno

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

Join

Missing express types

Hey, I'm trying to use deno 1.46.3 with express + @types/express, but it seems the types aren't being applied What can I do? ```ts // @deno-types="@types/express"...
No description

PHPStorm (JetBrains) needs restart of LSP server to pick up on code changes, fact of life?

I saw in the only other post showing up for JetBrains that the plugin is apparently not where it should be, I take it that is why I have to constantly restart the LSP server for the linting to actually pick up on my code changes, possibly when it has to do with imports and/or file name changes. I'm converting an old project now and fixes I do don't get registered without this LSP server restart, but then I am doing some pretty substantial refactoring. It hampers the transition to Deno quite a bit for me personally so I'm checking if others are experiencing the same, and if there is an easy fix for this or not. Otherwise I guess the place to talk about this would be in JetBrains issue tracker yeah? 😅 ...

deno_node

I imported deno_node as extension to support node API for my runtime using deno_core but I'm still getting this error: .cargo/registry/src/index.crates.io-6f17d22bba15001f/deno_core-0.307.0/runtime/jsruntime.rs:724:9: Failed to initialize a JsRuntime: Uncaught SyntaxError: Unexpected token '{' at ext:deno_node/_http_outgoing.ts:12:13...

[ERR_MODULE_NOT_FOUND]

I get this error, and, surely, going into the aformentioned path to check, I don't seem to have the file it's looking for - even though the directory exists. (See the attached image) ```ps1 PS C:\Users\Emil\Projects\emoji-game> deno run dev Task dev deno run --allow-net --allow-read server.ts...
No description

No Tailwind CSS Autocompletion in WebStorm IDE

Hey everyone, I’m working on a project using Tailwind CSS in WebStorm (JetBrains IDE), but I'm facing an issue where the autocompletion for Tailwind classes isn't working. The project was just created using the official command from the Fresh documentation: ```bash deno run -A -r https://fresh.deno.dev...

Fullstack Roadmap with Deno

I would like a full-stack roadmap tailored specifically for Deno: Include both Deno-native tools and external options that integrate well with Deno. Prioritize Deno-specific resources such as:...

Corepack

Hey, does Deno support Corepack?

Compiling typescript frontend and serving it with Deno

I'm using Typescript with Express+Socket.io for my multiplayer game's backend. I have a client directory that should contain the frontend source code where I want access to the DOM api in the browser. Is this possible? Or do i have to make a separate non-deno project that compiles its client post-compiled .js files to be served from my Deno backend?...

How to unwatch from kv.watch?

When using kv.watch, I notice that it returns a ReadableStream. What's the recommended way to "unwatch" it? Are we meant to call ReadableStream.cancel() ourselves? Or is it safe to just stop reading from the stream and abandon it? Or what's the recommended way to do this?

Dependency tree not resolving properly for deno modules in local filesystem.

Background: I'm working on an application with many custom utilities as dependencies. I have these utilities divided out into smaller deno.json packages for better organization. All of these utility packages are on my local filesystem, and since I'm still working on development and planning still I'm unlikely to publish them at the moment. Some of these utilities depend on eachother and form a tree of package dependencies; all on my local filesystem. Some of the utilities are shared between multiple projects and are kept in a separate generic libs folder on my filesystem. Issue For some reason I'm getting an error when trying to test my application with deno run: ...

JXS/TSX Transformation from within browser code?

Background: I'm working on a small browser/pwa based project that allows a user to define TSX components in a web form and and then render them as previews. Question: Does Deno have a default or built in way to transform TSX that can be imbedded for use like this? My current plan was to import babel from it's npm package and use the typescript transform plugin; but if there's a more standard, efficient, or concise way built into deno that's be cool to know about! Thanks!...

Deno with Jupyter AI

I have Deno running with Jupyter in VS Code and I would like to add the Jupyter AI features. The use a "special command" syntax %ai so I guess this needs custom support from Deno ? Does Jupyter + Deno work with Jupyter AI ? Thanks

unable to catch an error originating from a request

trying to test out failure logic, i keep encountering error: Uncaught (in promise) TypeError: error reading a body from connection with no further details. tried to look it up online with no success; i have .on("error", ...) handlers setup everywhere where an error may occur....
No description

Embedding Deno in a Rust App to evaluate dynamic javascript/typescript inputs/files?

Given deno is written in pure rust, can i embed deno as an internal javascript/typescript evaluator for a rust app. The use-case is having user submitted scripts to evaluate on a streaming input and collect response generate by the script against that input. having a dynamic script submitted as a javascript/typescript offers big flexibility for my system.

Deno Datagram vs Node Datagram

When using the node default library in Deno, everything works fine, however, when using Deno's, I get os error 10051 A socket operation was attempted to an unreachable network

Installing Deno dependencies error for NX repo

deno install --allow-net --allow-read --allow-write https://deno.land/x/deno@v1.29.2/cli/install.ts https://deno.land/x/deno@v1.29.2/core/tools/fmt.ts https://deno.land/x/deno@v1.29.2/core/deno.ts ⚠️ deno install behavior will change in Deno 2. To preserve the current behavior use the -g or --global flag. error: Module not found "https://deno.land/x/deno@v1.29.2/cli/install.ts"....

deno-rc: JSX in VSCode

I've jumped up to the deno rc (2.0.0-rc.5) which nicely solves a gnarli NPM import error. I'm in a mono-repo deno "workspace", with a deno.json at the root contining: "compilerOptions": { "strict": true,...
No description

In a deno/npm hybrid monorepo, what are the options for importing a deno member from a npm member?

Hi, we're just looking into deno as a potential solution to simplify our typescript monorepo/npm workspace. Suppose have two members of a hybrid deno workspace/npm monorepo: - Member A (a deno member, i.e. with it's own deno.json) - Member B (a npm workspace/"member", i.e with it's own package.json)...

Can I "execute" javascript in deno?

Let's say there is a line like this ``` <script nonce="73fa3ef1f4ac4682af1cfcb8b3563a89">(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=...

Is there a function which can print a structure in deno/typscript similar to print_r in php ?

I would like to know which attributes and structure members a struct have and asked my self if there is something similar in deno/typscript to php https://www.php.net/manual/en/function.print-r.php I use deno 2.0.0-rc.5. Here the code which I use. The questioned line is this console.log(anchorTag.) //<= How to dump anchorTag? ```...