Deno

D

Deno

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

Join

Denols Neovim

Hello Everyone, I have denols setup and we are using the imports in deno.jsonc however, I cannot seem to gd to go to a dependencies definition, any ideas why this may occur? When I try to use gd on a base controller that comes from an import I get the following error I have asked this in the neovim irc channel and received no response after several days so I thought I would ask here hoping someone would have some insight/feedback...

Using std/crypto with x25519 crashes - How do i use node experimental modules instead?

Please help ❤️ my brain is beginning to melt 🫠 I'm trying to implement ECIES (Elliptic Curve Integrated Encryption Scheme) capabilities in my app, but the standard crypto library doesn't support it. This is because the standard implementation is based on either a faulty Chrome implementation or a faulty Node.js implementation. However, Node.js does have a fix, but it's hidden behind the --experimental-modules flag. In deno is there a way to enable this when importing modules from Node.js? Or am I forced to switch back to Node.js?...

Deno Jupyter Lab tsconfig

Hello! I am just starting to use deno kernel in jupyter lab, I have tried this in TypeScript: const user = {...

What is the right way to publish a module that depends on a package hosted on deno.land/x to JSR?

I am developing a module that depends on a package hosted only on deno.land/x . When importing modules with the https specifier, you know, it is unable to publish them to JSR. Therefore, I referred to this page (https://jsr.io/docs/migrate-x-to-jsr#manually-refactor-your-package) and tried to resolve the issue by specifying "vendor": true in deno.json to download the dependent packages into the vendor directory, then committing them to Git. However, when I try to import modules from the ./vendor directory, I get the error Importing from the vendor directory is not permitted ....

Cannot find CanvasRenderingContext2D

I am trying to use deno for a web target. Just to transpile all the TypeScript source code into a single JavaScript target. I am compiling with deno bundle --watch src/index.ts package.js --unstable-sloppy-imports. With a fairly simple tsconfig.json: ```json { "compilerOptions": { "target": "ESNext",...

Is there a way to test a request's configuration?

```javascript Deno.test("authenticate() uses the expected request", async () => { // arrange const mockFetch = new MockFetch();...

Can Jupyter deno create a new cell and/or modify a cell from another cell in the same notebook ?

Can Jupyter deno create a new cell and/or modify a cell from another cell in the same notebook ?

Redirecting inside a page in Fresh 2.0

Is returning a redirect response like this not working in Fresh 2.0 anymore? ```ts import { define } from '../utils.ts'; ...

Deno import use for local files?

I'm using Deno (v2) as an alternative to Bash Scripting, and I'm looking for an equivalent to Bash's Source statement, to include any common functions I might write. Of course, import { something } from "./myfunctions,ts" works fine as a relative path, And an absolute path works too, import { something } from "/home/john/.deno/mylibraries/myfunctions.ts". ...

Deno 2.0 displaying red-line errors in my typescript code, but they were non-breaking?

Hi! I'd like to use Deno for the integrated TypeScript and other useful features, but I had enough of the program (I think it was the vscode extension) showing some of my code as a deno-ts error when the project would run fine. It's been really weird because I'll try to fix the error, and whether I fix it or not, the red line ends up going away on its own eventually. It's been very iffy....

How to load islands in Fresh 2.0 plugins?

Im doing this one but looks like it's not working ```ts import * as allIslands from './islands/mod.ts' // named export components ...

How to let google find my website?

I try to configure stuff in google console, but it doesn't seem to work. Do I have to buy a domain or something?...

Handle import "npm:..." prefix on generated code

Hey 👋 I have a file that is generated from a graphql schema, which has an import at the top not using the "npm:" prefix. As it is auto generated I can not change this from "graphql" to "npm:graphql" easily. Is there any work arround, to still use the file? Best, Kalle...

Can deno restart the Jupyter kernel from within a notebook cell ?

I would like to force deno to restart the Jupyter kernel so it can refresh the cache - is this possible from within a notebook cell ? Maybe this help is missing a "jupyter" tag...

Is deno's cache philosophy coherent for local files ?

I'm new to deno and surprised that it will cache local files that are imported and not update the cache when those files change. This is particularly painful when tying to use deno in Jupyter. I assume that a good cache should be transparent to the user (developer in this case). If I want the cache to be further optimized so it no longer behaves like a normal cache but require manually tracking dependencies then I should have to enable an option or do something explicit. But maybe I am not under...

Deno VS Code extension with deno jupyter cannot find names declared in other cells

The deno notebook might decalre a variable in a previuos cell but the extension does not notice this and highlights the variable as undefined. Is this a bug?

Deno with Storybook:Do I need to install node.js? (need npx)

Hello there. I'd like to install storybook with deno 2.0.0-rc.7 on Debian GNU/Linux stable. ```sh $ deno run -A --node-modules-dir=auto npm:storybook@latest init...

How to workaround `deno compile` binary file limitations?

In my app I'm using sharp and after compile it looses the ability to load dll. ``` ❯ ./server error: Uncaught (in promise) Error: Could not load the "sharp" module using the darwin-arm64 runtime undefined: dlopen(/var/folders/4f/6rr3fjvx2wq742xvnz3lf1740000gn/T/deno-compile-server/Chat/node_modules/.deno/@img+sharp-darwin-arm64@0.33.0/node_modules/@img/sharp-darwin-arm64/lib/sharp-darwin-arm64.node, 0x0001): tried: '/var/folders/4f/6rr3fjvx2wq742xvnz3lf17)...

How to specify unstable fmt options?

I'm a bit confused where to specify these options? I wasn't able to trigger any autocomplete suggestions. Should it go into fmt.unstable.component or into unstable directly? Or somewhere else?...

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