Deno

D

Deno

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

Join

Issue with deno emit bundle in Workspaces - Need Help and Documentation

Hi everyone, I'm having trouble with deno emit bundle function, when my project is in workspaces. It seems like the bundling process doesn't support workspaces. Has anyone encountered this issue before and can provide an example of how to handle this use case? Are there any official docs available that address this? taking example from the official deno workspace docs: https://docs.deno.com/runtime/fundamentals/workspaces/...

Monorepo NextJS import problem

When I try to use NextJS in a Deno monorepo, the package import like import {add} from "@scope/add"; inside the nextjs app throws ...

How do you pass additional options to the code formatter, dprint?

Dprint is the formatter used by Deno, but the options listed for inclusion in deno.json are a tiny subset of those available in dprint. The doc here: https://docs.deno.com/runtime/fundamentals/linting_and_formatting/ says you can "specify custom rules" but never says how. Any insight appreciated!

Is there a way to read the current raw options for stdin?

I want to create an operation that uses raw input from stdin, but then resets it afterwards to whatever it was when the operation started. In other words, if it was already raw, then it should remain raw. If it was not, then it should be reset to be not raw. The same applies for the value of the raw options: e.g. {cbreak: true } In order to do this, I need to read the current raw options. Is there a way to do this?...

Module Federation using rspack, react, deno

Hey y'all - I've been tasked with building an application in a module federation context using react. I'd like to use rspack instead of webpack, and I am hoping to use deno to take advantage mainly of the typscript and testing features. Also a requirement is that the github environment uses github actions for ci/cd. Can y'all think of any issues I may run into, or if I am barking up the wrong tree here with Deno? Thank you!...

Try to use node-opcua-client (npm) with Deno but struggle

Hello, I want to try to migrate a little app to Deno because the compile option suit my need and that now it support npm package. I want to use the npm package node-opcua-client but I've got this error message ``` error: Uncaught (in promise) DataError: 'key_ops' property of JsonWebKey is invalid...

how to clear import cache of an file?

My project uses import to load submodules. And I want to make submodules reloadable without stopping the project: clearing the import cache of all mjs and ts files in the submodule folder and reimporting the entrypoint file. Is this possible to do in deno?...

Auto Import Not Working

Hi, I just created a new Deno project using vscode as an editor and am trying to get auto importing up and running. I have the Deno extension installed and enabled in my workspace settings.json: ``` {...
No description

deno: Exec format error

Hi all getting the below error when tri got install on a raspberry pi, guess its not compatible ? pi@pi:/mnt/eggdrop/ $ curl -fsSL https://deno.land/install.sh | sh ######################################################################## 100.0% Archive: /home/pi/.deno/bin/deno.zip inflating: /home/pi/.deno/bin/deno...

Does DENO_CERT append a certificate to the list of certs, or does it replace the list?

Does DENO_CERT append a certificate to the list of certs, or does it replace the list? I understand that DENO_TLS_CA_STORE specifies which cert store to use, but I'm not sure how DENO_CERT interacts with that.

Stuck at running lifecycle scripts

I was trying to migrate an express node js application to a deno oak application. For some reason when I run the lifecycle scripts for two of my dependencies bcrypt and argon2 using the command deno install --allow-scripts=npm:bcrypt@5.1.1,npm:argon2@0.41.1 which does run the script for bcrypt but gets stuck forever for argon2 (i waited for 20 minutes). The only change I have done to deno.json is to change the "nodeModulesDir" to auto....

How to resolve this issue: "Cannot find name 'Deno'.ts(2304)"?

Hello! I'm new to using Deno, currently on version 2.0.6. I'm developing with VSCode and have installed the extension provided by Deno. I created a project using deno init deno_start. In VSCode, I ran Deno: Initialize Workspace Configuration and enabled Deno enable. Here is the content of settings.json ```json...
No description

What's the correct way to build an api using oak?

Hello, I'm trying to build some apis with oak and typescript but I don't know if this is the correct way to do it, I want to pass a param(it works) but it says that ctx does'nt have the params; it would really help if you could pass me an example of how to do it
No description

does deno_graph natively resolve the path of workspaces?

Hi everyone, I'm working on a project that includes multiple workspace members defined in my deno.json file using the workspaces field. I'm using deno_graph to resolve dependencies, but I noticed that while it allows specifying an import_map, there's no option to include the deno.json file directly. Does deno_graph natively understand and resolve workspaces specified in deno.json? If so, how can I configure it to resolve dependencies across all workspace members? If not, what would be the recommended approach to handle dependencies in a multi-workspace setup using deno_graph?...

imports or deps.ts

Hi! I'm trying to create my first Deno app. I'm trying to dockerize it and the Dockerfile has this line: ```Dockerfile Cache the dependencies as a layer (the following two steps are re-run only when deps.ts is modified). Ideally cache deps.ts will download and compile all external files used in main.ts. COPY deps.ts ....

Failing to deploy with bcrypt npm package

Hey, I'm deploying my project on coolify with docker and it doesn't work with bcrypt. I get that warning: `Warning The following packages contained npm lifecycle scripts (preinstall/install/postinstall) that were not executed:...
No description

In nextjs, how to use deno.json.

first i run "deno add jsr:@std/fs". Then, " import { copy } from "@std/fs"; await copy("foo.txt", "./hello.txt");...

Dynamic import at compile time

I am trying to import files dynamically based on a glob pattern. These files are not imported correctly when I compile the application. It only works with a static string. Is there any way to make it work with the glob pattern? or is there a workaround? Or do I just have to import the files using static strings...

Problems with modules import

Hi, I'm coming from a nodejs background, I'm a fullstack webdev but I'm pretty new to Deno. Right now I'm trying to build a tokenizer for my app but I'm having an hard time understanding how the modules work in Deno, I think there is some authorization command that are needed to use modules as Deno is aiming security first. I'm coding on neovim. Here is a picture showing my problem. If anyone could help me with that, it would be really appreciated. Thank you and have a good day....
No description