Deno

D

Deno

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

Join

Best practice to import internal components

Many examples show that importing with file extensions is simple, but these todo examples are not connected to real-life scenarios. In reality, components are not just a single file (they include styles, tests, and the component itself), and you typically store each component in its own folder. This leads to duplicated imports like Button/Button.tsx, which look messy. For example, my project structure is as follows: ``` /...

`deno install` installs workspace members' npm dependencies, but not jsr dependencies?

In a monorepo setup, does deno install install the dependencies of workspace members? I couldn't find any mention of this behavior in either the deno install documentation or the workspace documentation, so I'm unsure if this is the expected behavior. Consider the following monorepo structure:...

https://github.com/apache/pulsar-client-node - does it work in Deno?

I tried to include it as follows: import pulsarNode from "npm:pulsar-client"; console.log(pulsarNode);...

How to locate a deep dependency?

I have a Fresh project with some NPM dependencies. One day the following warning pops up every time the server starts: ``` Browserslist: caniuse-lite is outdated. Please run:...

Can I import/reference Deno's TypeScript when bundling types?

I have the following import in a script that uses ts-morph to pull some types from TypeScript (TypeScript is currently pulled in via package.json as an entry in devDependencies):
import { version } from 'typescript';
import { version } from 'typescript';
...

Next throwing an error that seems to be "Deno not defined"

Weird issue here, but I'm probably misusing the client/server functions somewhere. Anyway, I have this function "getScores" ```"use server" import config from '../config.json' with { type: "json" };...

How we can use deno docs theme in our project?

Hey anyone please can help us to use deno docs website lume theme in our project?

Webpack on Deno

Hi!! I’m wondering how I could use webpack and the webpack terser plugin on Deno? Thank you!!!

VSC having issues with NextJS using Deno

so I installed Deno and NextJS and have successfully run both the front and backend, but unfortunately it seems like it's throwing lots of extra errors with the tsx renderer. example error:
Relative import path "next/image" not prefixed with / or ./ or ../
hint: If you want to use a JSR or npm package, try running `deno add jsr:next/image` or `deno add npm:next/image`deno(import-prefix-missing)
Relative import path "next/image" not prefixed with / or ./ or ../
hint: If you want to use a JSR or npm package, try running `deno add jsr:next/image` or `deno add npm:next/image`deno(import-prefix-missing)
...
No description

initial '$deno task start' failed because of emoji import

Console error logs `` Watcher Process started. error: Import assertions are deprecated. Use with` keyword, instead of 'assert' keyword. ...

Deno 2.0 can't find .pem files even with --allow-read?

Hi. I just need Deno to read these .pem files for a crypto key. The paths are correct, I'm sure. My container throws an error claiming the .pem files don't exist, I'm not sure why....
No description

Need help for rendering html and css file in backend

Hi, am using deno first time. I work always on express.js. am perfectly run a deno server using npm:express. but when am gonna render some static html and css, getting error, below is my code and folder structure attached as image.
No description

rl.prompt issue

when i use rl.prompt program freezes. how can i solve?...

Zed Deno Support

How well is Deno supported in Zed? I have installed the extension but I'm still getting errors.
No description

Cannot import when index.d.ts file

This is largely a question about node compatibility as what I really want is to run my existing large node/typescript project in Deno so that I can get good jupyter integration. I've managed to figure things out to where they mostly work but am running into issues where my existing code uses the npm type-fest package to provide advanced typescript types. So as an example, I have the following import in my code ``` import { LiteralUnion } from 'type-fest'...

SIGSEGV (invalid memory reference) after returning a freshly-compiled function

Hi all, apologies if this is not the right place to ask, but we're hitting an invalid memory reference error when using deno_core and would like to ask for help narrowing the problem down or even identifying the cause of the error. Here's a bit more context: we're using the deno_core crate to write a transpiler/interpreter[1] for the Nix language[2]....

Possible to use Deno.test for callbacks?

I've been implementing tests to make sure the porting of my main project to Deno is working out as expected, coupled with this is a WebSocket server done with Deno.serve. For this the test needs to handle both a server and client session, waiting for callbacks to come through. Right now my test finishes prematurely even if I await the termination of the server, I need to set both sanitizeOps: false and sanitizeResources: false to have the test finish at all, but then it skips any assert defined in the callbacks. My previous experience is with Mocha where we get the done callback to run to finish the current test, but for Deno.test I only see us getting the option to make the test caller asynchronous, which in this case doesn't seem to help me....

Does Deno-bindgen work with Deno 2.0?

Just looking for a chatbot response. Does Deno-bindgen work with Deno 2.0?

Cannot run Nitro project

I have created a new Nitro project using deno run -A npm:giget@latest nitro nitro-app --install. It was successfull but after trying deno run dev I get an error saying: ``` error: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'pathname') at getPathname (ext:deno_node/_fs/_fs_stat.ts:177:49) at ext:deno_node/_fs/_fs_stat.ts:151:13...

jupyter / deno local import will not update

hello.. I'm using jupyter with deno kernel and am importing a local file to run in a cell. But when i update the file, the cell/notebook logs the files original message. Is there a way to force the jupyter / deno notebook to use (or reload) the new file?
Next