Deno

D

Deno

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

Join

'deno run' for tasks question/Bug 🐞

Hi I am not sure if this is a bug, so I thought to ask here first. So I understand Deno has both 'run' and 'task' sub command for running tasks. However if there is a 'directory' and a task with same name, I find Deno conflicts and gives directory a precedence:...

Issues installing npm packages

Im attempting to install discord.js (an npm package) via cli using deno install npm:discord.js It says its added successfully and shows up in deno.json, but says I don't have the module installed when I try to use it in a ts file....
No description

Nextjs+prisma on deno deploy !

Is possible to deploy nextjs+prisma on deno deploy ? I ask because I faild to do it even I ran nextjs+prisma in local using deno

Cookie issues

My response header contains a valid set cookie header but the cookie is not being saved in my browser cookie storage

Native file selector for Deno

Hey guys, I am creating a Deno compile executable , and I want the user to be able to select a file from their system. (I only care about MacOS and Windows). The only info I want to get the full path to the file the user is selecting (I don't think this can be done on the web cause of browser security reasons that spoof the full location with FakePath). Is there a way to do this using Deno? Or some sort of 3rd party module or node js module? Thx!...

Best Practice for Windows Service Watchdog (GUI Apps)?

Hi everyone, I'm looking for the best way to create a watchdog service using Deno on Windows. This service needs to: - Run as a Windows service: Ideally, it should start automatically on system boot....

npm:mongodb connection issue, timeout

After facing bson corrupt errors frequently with https://deno.land/x/mongo@v0.33.0/mod.ts we started exploring options and replaced it with npm:mongodb@6.14.3 (latest) but facing connection issues with both Username - Password/X.509 auth options. Has anyone connected to mongodb recently with deno version 2, guide me on setting up the connection. we are facing timeout error with usernamee-password auth mechanism. X.509 has other issues....

Test using png mocks

When using imports with *.png files it will crash denos testing system with a warning:
error: Expected a JavaScript or TypeScript module, but identified a Unknown module. Importing these types of modules is currently not supported.
Specifier: file:///home/zweieuro/Documents/uni/2023_SS/WUI/html_UI/vivaci_ui_deno/client/src/player_life.png
error: Expected a JavaScript or TypeScript module, but identified a Unknown module. Importing these types of modules is currently not supported.
Specifier: file:///home/zweieuro/Documents/uni/2023_SS/WUI/html_UI/vivaci_ui_deno/client/src/player_life.png
...

deno-ts throwing fake errors on new Nextjs App. Can't find any similar issue online.

I think this is an issue with TS configuration? I am trying to follow https://docs.deno.com/examples/next_tutorial/, but it doesn't mention any of these errors, such as the fact that you have to run deno npm:create-next-app@latest with the --skip-install flag. I have just created the Nextjs app and run deno install, as well as created the deno.json. deno task dev works, but there are many errors, such as the fact that I need to write the import React from "react". This didn't go away when I changed set "jsx": "react-jsx" in tsconfig. I also got the errors below: TS2786...

CSS Parsing Error During Next.js Deployment on Deno.

I am facing an issue while deploying my Next.js (15.2.1) application on Deno Deploy. The deployment fails with the following error: Error: The deployment failed: Error parsing 'file:///src/.next/static/css/6c5fadf7446c0717.css': Expression expected at file:///src/.next/static/css/6c5fadf7446c0717.css:1:2 *,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-... ~ ...
No description

deno test on react template

The deno react +vite starter tempalte doesn't run deno test -A successfully https://github.com/denoland/react-vite-ts-template

Import module from gitlab server

Hi! I want to import an npm module from my private gitlab server, the server and module itself do not require an auth tokenand are publibly accessible. How do i add it to deno ? If possible I want to avoid adding my own server to my npmrc and then importing it. ...

Deno check/lint doesn't warn against obvious bugs

```ts type Point = { [key: string]: number }; ...

deno dnt not including a TS file when building a NPM package

Hello I have 2 release problems I need help with. I have a project with a file located under "lib/utils/" folder that is called "logger-worker.ts". This file is loaded from a call in another source file when creating a worker thread, like:...

Is dynamic import in global installed CLI broken?

My CLI uses dynamic imports. It works without any problems when I import it into a project. But when I install the CLI globally and try to run it, I get the following error message: TypeError: Relative import path “@std/path” not prefixed with / or ./ or ../ ...

Deno, React, Next.js

I like love the simplicity and security of Deno. However, if I need to build a React and Next.js app due to a customer requirement, are there any benefits to using Deno? (I am totally new to Deno)...

Build a React app with a starter template incorrectly setup

Hi! After running the setup for the react template https://docs.deno.com/examples/react_tutorial/ there are some errors that VSCode reports. Mainly that main_test.ts for the server can't find packages specified in: ```js import { afterAll, beforeAll, describe, it } from "jsr:@std/testing/bdd";...

Install Deno globally for all users on a Windows 11 machine

I'm setting up a PC for multiple users and would like to have Deno available to them. I've tried several ways of installing it so far, and it always was just available for my local admin user that I used to install it. I started from a fresh Win11 install. I tried: - Install from the admin account with NPM - Install from the admin account with Winget (using --scope machine)...

What are the best possible ways to create islands in Fresh?

We are developing a SaaS product using Fresh and are exploring the best ways to structure our islands for optimal organization and maintainability. We've come across two primary methods for defining islands and would appreciate your insights. Our Current Understanding: Option 1: Root-Level Islands:...