Deno

D

Deno

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

Join

Distroless Docker image fails with `libc.so: cannot open shared object file: No such file`

I am building a 1:1 with a Node project using the same base for a docker image distroless/cc. Both projects use the same external dependency pulled from npm called libsql however the Deno project seems to fail with the following error
libc.so: cannot open shared object file: No such file or directory
libc.so: cannot open shared object file: No such file or directory
...

Bootstrapping a minimal node-compatible runtime

I'm trying to bootstrap a minimal node-compatible runtime, so I've basically been copying and pasting MainWorker and removing things I don't need like napi or kv ```rust let permissions = PermissionsContainer::allow_all(); ...

I want to adjust around tls using fetch API

With nodejs, you could specify a cipher suite or version to be used with tls. Can't you do the same thing with deno? If there is already a way, please tell me. If the method doesn't exist at this time, we hope to add it in future updates...

RUN deno task in Dockerfile

I have made a script to make DB migrations happen using "deno task migration", and I'd love for it to run that during deployment, using a Dockerfile. Currently my dockerfile looks like this: FROM denoland/deno:1.37.1 WORKDIR /app USER deno...

Help Web.js

rq need help in web.js \ ```js window.paypal .Buttons({...

Unable to load env variables in local

I'm starting again with deno since a long time with a small telegram bot using the grammy framework, and since i need an API key i have to store it in environment variables. Those .env files are stored inside the src/environment folder, and when i call the function loadSync from the dotenv library in deno.land/std with export=true and the correct environment file paths it does not load them. In fact I've also tried seeing if the object that loadSync would return contained any of my variables and it's completely empty. I'm really confused as a long time ago i never had a slight problem using the dotenv library. I've also put the --allow-all flag before running the process and it just doesn't read them. Just to be more explicit this is the command I'm running: deno run --allow-all --watch src/index.ts where index.ts is the entry point of the application....
No description

Why Bad resource ID occurs?

I ran the following and got error: BadResource: Bad resource ID on seek. ```typescript import { toText } from "https://deno.land/std@0.204.0/streams/mod.ts"; const temp = await Deno.makeTempFile(); const file = await Deno.open(temp, { create: true, read: true, write: true });...

Storybook: some lightweight alternative for Deno?

Do you know some lightweight alternative for Storybook to run on Deno?

How can i change the location of Cache.open('somedb')

We're deploying to docker containers which needs to write to an attached volume (specific path)

How do I make Objects, Maps, etc. in rusty_v8 into easy-to-understand String?

Hello. I wrote the following code in rusty_v8 ```rs let isolate = &mut v8::Isolate::new(Default::default()); let mut client = InspectorClient::new();...

Usage of Deno.Command?

Hey guys we use Deno.run to launch shell cmd and pipe the result to log. But Deno.run will be deprecated and I am not able to write a good equivalent with Deno.Command, do you have a suggestion? Here is my simple Deno.run: ...

When the destination server is down, WebSocketStream stops and the program crashes.

I'm running the following code: ```const ws = new WebSocketStream("wss://localhost"); setInterval(() => { console.log("test...");...

Struggling with interactive FreshCharts

Hi there I'm trying to display charts in my fresh js project. i want to have them as islands according to the github repo https://github.com/denoland/fresh_charts the /islands/chart.tsx should look like this
import { Chart as default } from "$fresh_charts/island.tsx";
import { Chart as default } from "$fresh_charts/island.tsx";
...

Turso with local db file

I wanted to try out Turso's syncURL feature and for that it creates a local db file to read from and syncs any written data remote first before it writes it locally. However, I am not getting that far due to the following issue: LibsqlError: URL_SCHEME_NOT_SUPPORTED: The client that uses Web standard APIs supports only "libsql:", "wss:", "ws:", "https:" and "http:" URLs, got "file:". For more information, please read https://github.com/libsql/libsql-client-ts#supported-urls ...

Importing local NodeJS module from Deno

Is it possible to import a javascript file that has node imports for standart modules like http just designed for NodeJS use? For Example: ```ts //main.ts [Deno] import crypto from 'node:./module.js'...

how I can install antd in my deno project?

how I can install antd in my deno project?

Deno Fresh Twind Colors

Just a message to anyone using Deno Fresh and wondering why their tailwindcss colors aren't working- Twind requires a separate package for additional colors to be configured in the configuration. https://twind.dev/handbook/configuration.html#theme...

Can you run Deno.serve in a pooled thread mode?

is there a way in Deno to run a http request in a separate thread?

How do I rerender my island after a signal change?

Hi there im trying to rerender this sidebar navigation when you toggle it, making it change size and changing the button but nothing really happens! Thx in advance for your input! ```tsx import { useSignal } from '@preact/signals'; ...

'Relative import path not prefixed' error from @types/express .d.ts file?

Converting an express mjs project to deno & TS, and running into an issue using code from this example: https://docs.deno.com/runtime/tutorials/how_to_with_npm/express Using ```...