Deno

D

Deno

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

Join

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:...

Function as a value?

I would like to know what is the best way to store a function as a value in a class because I am trying to track a constantly updating function

Deno Compile Can't Find Node Module

``` { "version": "0.0.1", "imports": { "@aws-sdk/client-ssm": "npm:@aws-sdk/client-ssm@^3.750.0",...

Vite + Codemirror in SvelteKit 4 broken due to @codemirror/state being loaded twice

I am trying to migrate the SvelteKit project from Node to Deno, and this issue is preventing me from switching over. The npm modules installed alongside SvelteKit 4 needed to reproduce are codemirror @codemirror/lang-json I would imagine that being able to change the .deno directory to somewhere outside of node_modules would fix this....

where the env vars of deployments deployed through Deploy REST API are stored?

Hey there folks, have a question. Using Deploy REST API, we can create brand new project (& deployments) and pass it environment variables, then on every request the isolate has access to them. Now, the question is, since they are persisted, where these variables are visible and where they are stored? Cuz i don't see them anywhere in my account/project/deployment info, which is good for my use case. How are they protected? Who can see them?...

Web Cache Limit?

Does cache size grow unbounded or is there a way to autoevict (LRU or something)? https://docs.deno.com/api/web/~/CacheStorage#method_open_0...

CORS problem with my deno web server

I wrote this tiny websocket server in deno: ```Deno.serve((req) => { const webSocketUpgradeRequested = req.headers.get("upgrade") === "websocket"; if (!webSocketUpgradeRequested) {...

Init KV data in Fresh from JSON

Hello guys. I'm trying to init data from JSON file to Deno KV in FRESH, where should I add this code? is it right in main.ts?...
No description