Deno

D

Deno

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

Join

Nextjs. task dev

so unsure what's going on here but I've cloned my git project to my work macbook but whenever I use deno task dev with nextjs it gives me this error
error: Uncaught TypeError: (0 , _module.findSourceMap) is not a function
error: Uncaught TypeError: (0 , _module.findSourceMap) is not a function
I tried making a new project with the same issues, I use the same nextjs and deno version at home maybe this is just a mac diff, at home it does work on my windows with the same versions used any suggestions to what it can be can't find much online about this...

CRON on Deploy

Hey, is CRON working fine on Deploy? Maybe I don't know how to use it. I have created a file cron.ts a put there: Deno.cron('Run once a minute', '* * * * *', () => { console.log('Hello, cron!'); }); ...

Cannot access files inside package when running from jsr

I have the following "init" script populating new project using files in project-template ```ts import path from "node:path"; ...

Leaks Detected

Hey guys - got a couple of blocks of tests that are flagging detected leaks. It would be awesome if we could get more details on these detections. I understand from past issues there are challenges to do with the layers that Deno tests are built on. So this is a bit of a hail-Mary in case someone can guide me as to how to track down a leaked file....

Deno Jupyter: get path to the current notebook

Is there a way to get current full path to the current notebook from within a ts cell when running deno kernel in Jupyter? import.meta stuff does not work since it's not a module

DeployCTL deploy without getting a new github token every time?

Must be a way to persist a token to make deploy more streamlined..

Wierd issue with uncaught exception in WebSocketPovider on Canary

On stable the error listener block is executed but in canary (which I have been using as a fix to "Warning: Not implemented: ClientRequest.options.createConnection") the error doesn't seem to propogated to the listener and thus the rest of my code, instead an uncaught error is thrown, which is messing up my tests since I am expecting this error event to be thrown. ``typescript provider.on('connect', () => { console.info(Connected to ${url}`);...

CI friendly deploy outputs?

Is there a way to disable CLI spinner when running deployctl in a CI environment?
No description

Problem resolving imports from tailwindcss npm package

I'm having a problem with Deno 2 resolving imports from the tailwindcss npm package. I've included my code as an example below. I have the following task and imports in a deno.json file: ```json { "tasks": {...

fresh-runtime

GET http://localhost:8000/_fresh/js/f7e31e9f83545a78ac39f70f6450635d421025e9/fresh-runtime.js net::ERR_ABORTED 500 (Internal Server Error)
GET http://localhost:8000/_fresh/js/f7e31e9f83545a78ac39f70f6450635d421025e9/fresh-runtime.js net::ERR_ABORTED 500 (Internal Server Error)
...

Deno error on Hono Swagger UI

Hello. I am receiving a Deno error on the following snippet: ```ts import { randomInt } from "node:crypto"; import { type Context, Hono } from "hono";...

Unable to use @apollo/client

``` // query github api using graphql import { ApolloClient, HttpLink, InMemoryCache } from "@apollo/client"; import { RepositoryDocument } from "@hk/github-graphql"; ...

fresh + workspace

i have bootstrapped a fresh project inside a deno workspace. when installing at the workspace root, i get the following error: ``` $ deno install --allow-scripts=npm:@bufbuild/buf@1.47.2 error: Relative import path "@preact/signals-core" not prefixed with / or ./ or ../ and not in import map from "https://esm.sh/v135/@preact/signals@1.2.2/X-ZS8q/denonext/signals.mjs" at https://esm.sh/v135/@preact/signals@1.2.2/X-ZS8q/denonext/signals.mjs:2:196...

Linux Zip Compression From CLI

I’m trying to compress all files in the current working directory into a zip folder. I’m using this package for compression. The compression works on my windows device, but not on linux devices. The error is the one shoe in the image. The code handling the compression is in this file at line 118. Could someone tell me what i’m doing wrong? I assume it is to do with the wildcard during the comp...
No description

How can I setup mongoose on deno+next.js app?

I have created a next.js project by following this tutorial: https://docs.deno.com/examples/next_tutorial/ Now how can I connect mongoose on this project? I followed this tutorial: https://docs.deno.com/examples/mongoose_tutorial/ to add Mongoose to Deno+Next project but can't. Please see my attachment screenshot....
No description

env vars interpolation across multiple --env-file

I have two env files: .env1 .env2 .env1 contains FOO=foo...

Issues migrating dependencies from v1.x to v2.x

Hey, I'm facing some issues when upgrading from v1.146 to v2. We have a backend monorepo that uses import_map.json files to manage dependencies per sub module in our monorepo. We don't have a package.json for Deno (only for our Next.js frontend which is still on node). We do have a deno.jsonc at the root level of our project. After upgrading to Deno v2, we get these errors when we run or try to install: ```sh install...

How do I install NPM packages as *development dependencies* in Deno? Is that even possible?

Hello! I am starting a new project and I am using Drizzle. I have installed dependencies as deno add npm:drizzle-orm, but I also need the following command npm i -D drizzle-kit tsx to install drizzle-kit as a dev dependency, how do I achieve this in Deno?...

Deno vs Node `Intl.DateTimeFormat().resolvedOptions()` discrepancies

Hello, we use dayjs as our time lib, and we noticed some issues related to timezone dates. At first I thought it was dayjs plugins misbehaving or giving problems, but then I used Intl.DateTimeFormat().resolvedOptions() to verify the detected system TZ and notices a huge discrepancy. Node is outputting America/Puerto_Rico which is the correct TZ while deno outputs America/Anchorage. Is this known issue?...
No description

Support Fix All in VS Code for lint errors?

With eslint and node.js I can apply eslint --fix on file save with this setting: { "editor.codeActionsOnSave": { "source.fixAll": "explicit" }. Deno's VS Code plugin doesn't seem to recognize the "Fix All" command in the command palette. How do I enable deno lint --fix on file save?...