Questions tagged [deno]

A secure runtime for JavaScript and TypeScript.

Filter by
Sorted by
Tagged with
0 votes
0 answers
22 views

SolidJS + Oak + Deno + Mongo DB [closed]

I'm trying to test out whether to go with this stack, and create some simple interactive pages. Mostly SSR for now. I can get Mongo DB (DocumentDb) + Deno (JS runtime) + Oak (JS framework) to run ...
Sachin's user avatar
  • 117
0 votes
1 answer
56 views

STRIPE Checkout session Invoice : session.invoice is null in the response object whereas i enabled invoice_creation in stripe.checkout.sessions.create

invoice id of a checkout session response is null even if i enabled invoice_creation in the request object. It worked before, i was able to get this id but now i get a null value. I need this invoice ...
Fefe's user avatar
  • 1
1 vote
1 answer
50 views

Svelte + EsBuild + Deno - Uncaught TypeError: Cannot read properties of undefined (reading '$$')

I am using Deno and I am getting this error in the browser: Uncaught TypeError: Cannot read properties of undefined (reading '$$') This is bunder.ts: import * as esbuild from 'https://deno.land/x/...
tsaxking's user avatar
0 votes
1 answer
50 views

How to connect the stdin streams of parent and child processes?

I have problem to write stdin in deno version 1.37.0 (release, x86_64-pc-windows-msvc). I search in documentation, google, try the code and not work. I found related code in https://github.com/...
ferdiansyah0611's user avatar
1 vote
1 answer
31 views

Handling client disconnect/abort during streaming response in `Deno.serve`

I have some Deno server code that looks roughly like this: Deno.serve((req) => { let asyncIterator = getChunkIterator(req.url); const stream = new ReadableStream({ async pull(controller) { ...
joe's user avatar
  • 3,840
0 votes
0 answers
9 views

Lume omit doctype?

Is it possible in Lume, using Nunjucks, to refrain from rendering a doctype? I am using Lume to create HTML snippets, destined for another system. (I'm not rendering entire HTML pages.) The doctype ...
allanberry's user avatar
  • 7,355
-1 votes
1 answer
34 views

Implicitly using latest version (0.202.0) for https://deno.land/std/path/mod.ts

I am trying to build my project and its giving error with latest std version 0.202.0. (https://i.stack.imgur.com/Cc7Cd.png) This is my Folder structure I have spent some time to investigate the error ,...
Kiran's user avatar
  • 1
-1 votes
0 answers
35 views

I was trying to build my application and we have deno library in it . its giving error for latest version of std 201.0

Can someone plz help me with this , i am facing below deno std error with latest version 201.0 And i dont know how to force to use the older version . This us transitive dependency like mod.ts has os....
Kiran's user avatar
  • 1
14 votes
1 answer
623 views

Hardcoding large amounts of data without inducing memory spike

So I am exploring the concept of storing WebAssembly inside the JavaScript file so it can all be bundled up in one shippable file. I did manage to make a working example of this where it stores the ...
Dr. Light's user avatar
  • 376
0 votes
1 answer
51 views

How to handle a user abort by Deno.serve

The Deno website has an example at: https://deno.land/[email protected]/runtime/http_server_apis#inspecting-the-incoming-request I have shortened it to the following code: const abortController = new ...
Pascal's user avatar
  • 45
0 votes
1 answer
34 views

Slack Apps created using the CLI can only be managed through the CLI

I'm trying to setup an app which is a replica of this sample app. It works great when I do slack run using the the Slack Deno SDK (Slack CLI v2.9.0). However, when I do slack deploy, it doesn't work ...
ystark's user avatar
  • 565
-2 votes
1 answer
25 views

What would make a script to get stdout returns differently on different locations?

import * as path from "https://deno.land/[email protected]/path/mod.ts"; async function getStdout() { const dirname = path.dirname(path.fromFileUrl(import.meta.url)) const cmd = new Deno....
Ooker's user avatar
  • 2,067
0 votes
1 answer
40 views

How to send back multiple partial responses for an HTTP Post request?

I am implementing a Supabase Edge function, which runs on Deno runtime, and uses the Oak framework. During the processing of my HTTP POST request, I want to send back partial responses to the client. ...
sanket patel's user avatar
-1 votes
0 answers
27 views

How to use esbuild with Deno for NPM packages?

esbuild --bundle --format=esm .\main.ts ✘ [ERROR] Could not resolve "npm:fibery-unofficial" 4. Tạo kết quả/4.2 Đẩy lên fibery.ts:3:19: 3 │ import Fibery from 'npm:fibery-...
Ooker's user avatar
  • 2,067
0 votes
0 answers
28 views

How to clean Stack Trace in Deno?

I'm using custom raise function to throw errors and the first line in stack trace contains the raise function itself. I would like to remove the first line, but it doesn't work in Deno, it still ...
Alex Craft's user avatar
  • 13.7k
0 votes
0 answers
23 views

Deno: P selector in Deno-Puppeteer not working?

The following code works fine in node's version of Puppeteer: const seletAllCheckbox = await pages[0].$$(">>> .datatable-select-all"); The exact same code in deno-puppeteer throws a ...
user1763684's user avatar
2 votes
1 answer
39 views

Deno: How to run shell command and read output before child process completes?

How do I launch a child process (via shell) and read its output without (before) the child process returns? I"m launching Google Chrome via the Mac Terminal with the following command: /...
user1763684's user avatar
-1 votes
0 answers
23 views

When I tried to access my locally created the HTTPS server using browser, the connection immediately dropped

The server run into the errors but when I open the https://localhost:8080/ using the browser. As follow: error: Uncaught (in promise) Http: error writing a body to connection: tls handshake eof: ...
fwqaaq's user avatar
  • 1
0 votes
1 answer
34 views

no possible to make i18next work in Deno+Fresh Project

I have a Fresh project (1.4.2) and I try to add localization with i18next it works adding text from file but it does not work when I want to change the language by pressing a button. When pressing ...
Vicens Fayos's user avatar
0 votes
0 answers
42 views

supabase edge function using only js not ts

I am trying to write a supabase edge function with deno. But I can see that when I run this command. create edge function npx supabase functions new FUNCTION-NAME It creates a function file called ...
Lonare's user avatar
  • 3,658
0 votes
0 answers
34 views

What is the url for AWS SDK v3 for esm?

Hi I am coding a supabase edge function. What I am trying to do is send email with AWS SES service. In order to do that I need to import AWS SDK v3 into the edge function. Now as we know supabase edge ...
Lonare's user avatar
  • 3,658
0 votes
1 answer
43 views

Issue deploying a Deno Fresh app using new ahead-of-time builds and GitHub actions

I'm trying to deploy my Fresh app using the new ahead-of-time builds to pre-optimize static assets. I've followed the instructions on the docs site and it works just fine locally. However, when trying ...
hcode's user avatar
  • 15
0 votes
0 answers
27 views

SequelizeConnectionError: read UNKNOWN

SequelizeConnectionError: read UNKNOWN I'm encountering a "SequelizeConnectionError: read UNKNOWN" error when attempting to establish a connection to a YugabyteDB database using Deno and ...
peacewalker122's user avatar
0 votes
0 answers
27 views

How to pass arguments when debugging Deno apps?

Code: console.log(Deno.args[0]) console.log(Deno.args[1]) launch.json: { "version": "0.2.0", "configurations": [ { "request": "...
Ooker's user avatar
  • 2,067
0 votes
0 answers
59 views

How do I add web components to typescript JSX type for preact on Deno?

How do I add web components to typescript JSX type for preact on Deno? /// <reference lib="dom" /> /** @jsx h */ import { PreactDOMAttributes, h } from 'https://esm.sh/[email protected]'...
ThomasReggi's user avatar
  • 55.4k
0 votes
1 answer
74 views

Why doesn't `console.log(Deno.cwd())` print anything in the debugger?

I have a simple path/to/test.ts script: console.log(Deno.cwd()) It runs fine with deno run --allow-read .\test.ts and returns path/to as expected. However using the debugger it returns nothing before ...
Ooker's user avatar
  • 2,067
0 votes
0 answers
44 views

Uncaught NotFound: The system cannot find the file specified. (os error 2)

In test.ts I have a simple file like this: const text = await Deno.readTextFile("a.md"); console.log(text); It runs fine with deno run --allow-read .\test.ts. However using the debugger it ...
Ooker's user avatar
  • 2,067
0 votes
1 answer
28 views

How do I add an extension to a parameter in oak/deno?

I'm trying to add .rss to the end of a parameterized url: .get( "/searches/history/tags/:tag.rss", controller.getHistoryByTagRss.bind(controller) ) I need a way to isolate the :...
chovy's user avatar
  • 72.6k
0 votes
1 answer
95 views

What is a "unexpected EOF during chunk size line" error in Deno?

I'm developing an Edge Function from Supabase locally. It runs on Deno. When I execute the code below, the following error appears: CPU time limit reached. isolate: 16597602940236451129 CPU time used: ...
Leo Holanda's user avatar
1 vote
1 answer
104 views

JSON-RPC v2 API. HTTP Layer. What are the appropriate HTTP Layer status codes for API responses?

I've been working on a Deno script that implements a JSON-RPC v2 API using Deno.serve(), which has been recently stabilized. While I've set up the basic CRUD operations and error handling, I'm not ...
suchislife's user avatar
  • 4,366
3 votes
1 answer
53 views

How to get Deno prompt() to go over 255 characters

If you run a prompt("Paste JSON into here") in Deno, you can put a maximum of 255 characters. Is there a method to make it unlimited, or at least get a better reasonable limit without taking ...
BookOfCooks's user avatar
0 votes
2 answers
77 views

How to export for specific files in nodejs or deno

By using export keyword, we can export anything from a file to another file in JavaScript. But is their any way to export for specific files. So that other file can't import from this file. export ...
maruf hasan's user avatar
0 votes
1 answer
25 views

quotes turn into backslashes with Deno.Command

await new Deno.Command('cmd', { args: [ '/c', 'start', `https://accounts.spotify.com/authorize?${new URLSearchParams({ client_id, response_type: '...
ahsan-a's user avatar
  • 214
0 votes
0 answers
76 views

Sequelize can not connect to postgressql in Deno

I wanted to connect Postgres database via deno and using sequelize package. Here's my code in deno: db.ts import { Sequelize } from "npm:[email protected]"; // deno-types="npm:@types/pg@...
Re9iNee's user avatar
  • 428
0 votes
1 answer
94 views

WASM (ImageMagick) based code blocks Deno Server

Below in my first example is a simple web server using deno's new serve api. If you open up curl and run curl -X POST -H "Content-Type: application/json" http://localhost:8000 quickly in two ...
ThomasReggi's user avatar
  • 55.4k
0 votes
1 answer
48 views

How can I pass an asterisk to one of the Deno.Command args?

I am trying to execute a shell command from Deno where one of the args contains an asterisk. Example: const output = new Deno.Command("cp", { args: ["source/*", "destination&...
birgersp's user avatar
  • 4,009
0 votes
0 answers
35 views

Can't using Deno-Db to connect to PostgressSql - Module not found 'events.ts'

I'm trying to connect to Postgres sql using Deno-db, I've grabbed this code below from official documentation and edit it to connect to my local server. import { Database, PostgresConnector, } ...
Re9iNee's user avatar
  • 428
0 votes
0 answers
39 views

JWS Java algorithm to Deno's jose (node.js)

I have the following code for JWS verification in Java: /** * Step 1 - Load signing keys via jwks file */ String JWKS_URL = "https://vf11gtostorage1.blob.core.windows.net/test-webhook-sign-...
Tal's user avatar
  • 623
0 votes
1 answer
106 views

Is there a specific way to use the import map for type information?

I am new to Deno and I am figuring out the import map feature. Currently, my import map for express looks like this: "imports": { "express": "npm:[email protected]" }, ...
GregFromMiami's user avatar
0 votes
0 answers
188 views

How to convert SVG data into a PDF document with svg2pdf.js server-side with Deno?

We try to convert incoming SVG data into a PDF output that is stored on our server. The processing is restricted to JavaScript and is preferrably done on a Deno server (or node.js). Our approach is to ...
cschlusche's user avatar
0 votes
2 answers
46 views

Fatal error in v8::Context::GetMicrotaskQueue: Must be called on a native context

I want to attach VS Code's debugger with Deno. It runs fine if there is no breakpoint, but if there is then there is this error: Debugger listening on ws://127.0.0.1:9229/ws/bbf9166c-7c7c-4d0f-a55a-...
Ooker's user avatar
  • 2,067
0 votes
1 answer
50 views

How do I use Express as a dependency, in deps.ts

Following the example to use Express with Deno: // @deno-types="npm:@types/[email protected]" import express from "npm:[email protected]"; const app = express(); app.get("/",...
birgersp's user avatar
  • 4,009
0 votes
1 answer
165 views

How to use JS client to pass formData to Supabase Edge function

I'm trying to call a Supabase edge function using the JS/TS client and pass audio from the client to the server. In doing this, I'm using formData on the client and trying to pass it in the body. Here'...
Brady Dowling's user avatar
0 votes
1 answer
51 views

How to handle HTTP and WebSocket connections on the same port in a Deno server?

I have decided to use Deno for developing a very small server that would serve a minimal page to the clients through HTTP and continue to communicate with them through WebSockets. I haven't managed to ...
Isti115's user avatar
  • 2,448
0 votes
1 answer
102 views

Configure global CSS in Deno Fresh

I'm trying to link a stylesheet that will style the html and body elements in my app. At the moment I've tried using the <Head /> component but this is only sent with the component it's imported ...
zing's user avatar
  • 562
1 vote
1 answer
38 views

Determine if running uncompiled .ts script or compiled Deno executable

I want my program to be able to create a symlink to itself. The problem is that I want to distribute it as a compiled executable, but I also want to be able to test it as a script during development ...
Stabby's user avatar
  • 97
-1 votes
1 answer
75 views

Plaid client axios "export error" in Supabase Deno edge function

I'm attempting to implement Plaid using Supabase edge functions, which use Deno. The library is imported using an import map from https://esm.sh/[email protected]. The client instance is created ...
pete's user avatar
  • 2,749
2 votes
1 answer
206 views

Node fetch implementation seems to differ from Deno and Bun causing a website to return no response?

I am trying to fetch the html for my universities login page. When using the built-in fetch in node I get the html response as expected. when using Deno and Bun however the response is nothing. Deno ...
user12957229's user avatar
0 votes
1 answer
163 views

Why does getAttribute not exist on type "Node"?

I'm converting some Javascript I wrote into a Deno TypeScript module. The script uses deno-dom to get all the "a[href]" links off of a page, and returns a list of links. The script is ...
T0nic's user avatar
  • 50
1 vote
1 answer
106 views

Deno fresh - List in island not updating

I'm creating a websocket based chat app to experiment with Fresh, but I'm struggling to render a basic list of messages to the page. Here's some code: routes/chat.tsx export default function Chat() { ...
zing's user avatar
  • 562

1
2 3 4 5
19