Questions tagged [deno]

A secure runtime for JavaScript and TypeScript.

Deno is a simple, modern, and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust.

  • Secure by default. No file, network, or environment access, unless explicitly enabled.
  • Supports TypeScript out of the box.
  • Ships only a single executable file.
  • Has built-in utilities like a dependency inspector (deno info) and a code formatter (deno fmt).
  • Has a set of reviewed (audited) standard modules that are guaranteed to work with Deno deno.land/std
919 questions
0
votes
1 answer

TypeScript Generics problem: type T (extends Type) is not assignable to T

I have a problem with TypeScript generics in Deno. abstract class Packet { public abstract read(): Uint8Array; public abstract write(data: Uint8Array): void; } type PacketData = Packet | Uint8Array; type HookCallbackResult
lem0nify
  • 684
  • 1
  • 6
  • 13
0
votes
0 answers

Odd behaviour in stdio for JavaScript based processes

I've found an issue that I've never seen before. I've tried to run a nodejs process through NodeJS's builtin Child_Process module. I achieved it like this: const child_process = require('child_process'); const proc = child_process.exec("node…
J-Cake
  • 1,526
  • 1
  • 15
  • 35
0
votes
2 answers

Import private repositories from gitlab into Deno

I'm trying to import a private Deno repo from gitlab into another Deno repo. I run the command: deno install "https://gitlab.com/username/my_awesome_project" But I got the error: error: Import 'https://gitlab.com/users/sign_in' failed: 503 Service…
0
votes
1 answer

convert base64 qrcode to jpg or png in deno

I wrote this code in app.ts file: const image = await qrcode(text); const imgTag = `qrcode`; const encoder = new TextEncoder(); await Deno.writeFile("./qr.html", encoder.encode(imgTag)); the problem its to output it's…
Cosmin Ciolacu
  • 406
  • 9
  • 29
0
votes
2 answers

Websocket connection in Deno

Good morning all, I am experimenting with Deno and Oak framework. I want to do a WebSocket connection between the front-end and the back-end. I know how to do it using the Deno standard library ('HTTP') but when trying to use Oak, I keep running…
Joe Germany
  • 11
  • 1
  • 4
0
votes
1 answer

Dockerfile error no such file or directory"

I try to use my Dockerfile at https://labs.play-with-docker.com. Its EOL conversion is LF. My file: FROM alpine RUN apk --no-cache add curl RUN curl -fsSL https://deno.land/x/install/install.sh | sh WORKDIR /root/.deno/bin # To print deno version at…
Andrey Bushman
  • 11,712
  • 17
  • 87
  • 182
0
votes
1 answer

error: Failed to get compiled source code of https://deno.land/std@0.59.0/path/mod.ts. Reason: The system cannot find the path specified. (os error 3)

After running my main.ts file with deno I get this error: error: Failed to get compiled source code of https://deno.land/std@0.59.0/path/mod.ts. Reason: The system cannot find the path specified. (os error 3) I am running my file with this command:…
Gabriel Arghire
  • 1,992
  • 1
  • 21
  • 34
0
votes
1 answer

error sending request for url (https://deno.land/std/encoding/csv.ts) (os error 10013)

Unable to import the stdlib files from deno.land to local cache on running mod.ts. error: error sending request for url (https://deno.land/std/encoding/csv.ts): error trying to connect: tcp connect error: An attempt was made to access a socket in a…
anbu25
  • 1
  • 2
0
votes
1 answer

Why is 'this' undefined in parent typescript class?

Having the following class hierarchy in a Deno Typescript project: AccountPutController.ts export class AccountPutController extends HttpController { constructor(commandBus: CommandBus) { super(commandBus) } async handle({…
AlexTa
  • 5,133
  • 3
  • 29
  • 46
0
votes
1 answer

Why does my import statement have a syntax error in Deno but works ok in Nodejs?

I'm testing with two VSCode setups; one running Deno, the other running Nodejs using the Sucrase compiler to transform the code so that I can write native ES6 modules. I have a very simple test: a small Class and a module that imports it. Here is…
MartinDuo
  • 663
  • 12
  • 25
0
votes
0 answers

Dynamic import not working on exported modules typescript

i'm working new web framework , do dynamic import don't deserve for default export? so how to do that with default export? Lol.ts import app from "../trap/app.ts"; //some code export default app; XD.ts import app from "./lol.ts"; declare global…
user13575712
0
votes
1 answer

Why does Deno flag a syntax error that does not happen using nodejs?

I converted a VB.Net program to JS to run on Deno. I wrote a little class to create the needed functionality of a .Net ArrayList component. Shown below: export class ArrayList extends Array { constructor() { super() this.add =…
MartinDuo
  • 663
  • 12
  • 25
0
votes
2 answers

Deno as Linux systemd service. How?

For reasons I don't understand, Deno is not a systemd service by default. It has an auto install script that drops the deno executable file in your /home folder. When you deno run a Typescript file using this executable, it loads up your script and…
suchislife
  • 4,251
  • 10
  • 47
  • 78
0
votes
2 answers

.deno_plugins folder created on Deno program API

On execution, Deno caches remote imports in a special directory specified by Deno Environment on the first run. The second time and so forth execution of the same piece of the code, i.e, next time you run the program, no downloads are made. If the…
Shravan
  • 11
  • 2
0
votes
1 answer

Deno with Postgres: Another accept task is ongoing

Running deno v1.1.0 and using deno-postgres Database is configured like so import { Client } from "https://deno.land/x/postgres/mod.ts"; class Database { client?: Client; constructor() { this.connect(); } async connect() { …
avion
  • 1
  • 1