Deno

D

Deno

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

Join

How to initialize global variable so it can be accessed without globalThis?

I'm hacking on a large existing codebase using Deno. This codebase uses a number of global variables like this:
if( __DEV__ && ... )
if( __DEV__ && ... )
...

Workspace documentation lacks explanation of `exports` member in deno.json

I was reading the documentation on workspaces and monorepos. It shows usage of the exports member ina deno.json file. The example shows it as a single string. There's no explanation of the exports member in the documenation for workspaces, monorepos, nor the "deno.json and package.json" help page, either. I am trying to understand how I can share commonly used enums across all of my microservices; but, I got confused. If my enums are declared in individual *.ts files (e.g. Statuses.ts, ExpirationTypes.ts, etc), how do I mark this up in my root-level and module-level deno.json files such that I can access the enums from within all modules? Specific example:...

Unable to log in to deno deploy

When logging in with a GitHub account on "deno deploy," an error message is displayed: "Cannot read properties of null (reading 'id')."
No description

Proper way to install deno on NixOS

I have just installed deno through: curl -fsSL https://deno.land/install.sh | sh But i am on nixos, what should be the proper way to install and run deno on NixOS?...
No description

unable to see documentation on deno.land/x

I just wanted to install jose, but the "view documentation" button seems to be missing...
No description

Deno land file path

Hey all, I'm trying to understand when I'm looking at a module on deno.land/x, how do I know the file path to use for an install? Is it solely reliant on the documentation provided on the module page?...

workaround for ts-node in package.json script

1. many existing projects use package.json script with ts-node. 2. due to https://github.com/denoland/deno/issues/17176 deno can't run them.
"compile:typebox": "ts-node cases/typebox/index.ts cases/typebox/build",
"compile:typebox": "ts-node cases/typebox/index.ts cases/typebox/build",
...

Help setting up a Deno project for a static HTML5 app using TypeScript and a Live-preview.

Hi all, i'm new to deno and want to try it out. 😉 https://discord.com/channels/684898665143206084/1128726030614544414/1332270619060076594 Although i'm not completely new to TypeScript (I can somewhat read it), unfortunately have not coded using it till now, at least that's the plan to start using it . Below are topics i want to cover / make use of:...

`--unstable-sloppy-import` not working

``` scarf@fedora ~> deno repl --no-lock --unstable-sloppy-imports Deno 2.1.9 exit using ctrl+d, ctrl+c, or close()
import { pipe } from 'npm:fp-ts/function'...

validateSchema getting better with v2.1.8 - but still not yet working

Hi all 👋 , I want to validate some xml files to a given xsd. npm:xsd-validator ...

Moving code to src/ caused VSCode errors about imports

Hi. I just started a new project, and at first I had all my code in root workspace directory, together with deno.json. I had subdirectories also, but the main files were at the top. Everything worked just fine. Now I decided to move all code to src directory and it caused errors like this popping up in VSCode: ``` Relative import path "drizzle-orm/pglite" not prefixed with / or ./ or ../...

Unable to update entrypoint configuration on Deno Deploy

I'm confused and stuck on updating the entrypoint for a project on Deno Deploy. I had initially set up the entrypoint at a different path, but then moved the entrypoint file and updated the deploy.entrypoint field of my deno.json to match the new path. Running deployctl deploy from the root directory results in a successful deployment. But pushing to main and triggering the Git hook for prod deployments continues to fail, when Deploy tries to find a now-nonexistent entrypoint. It seems as if Deploy isn't reading the deno.json to determine the entrypoint? Cross posted from my original message at https://discord.com/channels/684898665143206084/826085979344470037/1333951330607173713....

Deno Emit for Bundling - Potential Open Source Contributions

Hi Deno Team, We're exploring using deno emit as the future of bundling for Deno projects and are very interested in contributing to its development. Our team is ready and willing to submit PRs and tackle open issues related to deno emit as open source contributions. Before we begin, we'd like to confirm that you're also considering deno emit for this purpose and that there aren't any other planned approaches at the moment. This confirmation would allow us to align our efforts with your vision and ensure our contributions are valuable....

Problem with my api route

I created a dummy login api route under 'routes/api/login.ts' and when I call fetch on the url like so:
fetch("/api/login")
fetch("/api/login")
it fails because that's an 'invalid route'

ERROR “Promote to Productin” in Deno Deploy

On the “Over view” screen, When I press “Promote to Production” to switch deployments, I get a message like the one in the image. Is there a workaround?...
No description

Tell `deno outdated` to show patch level updates

Is there a way to tell deno outdated to show ALL updates, even those affecting only the patch level? I fI have "@std/cli": "jsr:@std/cli@^1.0.0" in deno.json, deno outdated won't say anything, even though the current version is 1.0.11. It's also unclear what version will actually be used in that case since the ^ is specified. The most recent in the cache? Does deno outdated silently update to the last patch level?...

Bad resource ID ERROR

error: Uncaught (in promise) BadResource: Bad resource ID
at node:http:306:27
at HttpsClientRequest._writeHeader (node:http:398:7) ...

Deno application with just a Websocket connection gives 504 in Prod Deno Deploy

I have a simple Deno application that opens a websocket connection and uses a supabase client to insert the data to the table. When I run the app locally, everything works fine, when I push the code to main and the app gets deployed, when I open the production URL, the site never fully loads and eventually I get a 504, I tried sending a basic Response with Deno.Serve but that did not work. I am not entirely sure what else to do, I started using Deno this weekend and it's also my first time using Websockets, if someone could guide me in the right direction I would hugely appreciate it! Thank you in advance and I apologize if this is not clear enough...

ROAD MAP 2025? Please read whole message

Hi Deno team, Could you please share the roadmap for the Deno ecosystem for 2025 when available? This information is important for companies like ours as we plan our adoption strategies and resource allocation for the coming year. Having visibility into the 2025 roadmap will allow us to: * Effectively evaluate Deno's future direction....

Jupyter Docker with Deno?

Hello all, is there a working Dockerfile based on jupyter/base-notebook that installs the Deno Kernel? Thank UUUUU