Klimenty
Klimenty2w ago

BadCertificate error using deno 1.25.4

Hello, I am facing an error in my deno + node js app. I cannot figure out how why it is happening. The error is too vague for me. I'm simply trying to install the dependencies. My environment (using Ubuntu 22.04.4 LTS): kkaravaev@kkaravaev1:~$ node -v v16.20.2 kkaravaev@kkaravaev1:~$ deno --version deno 1.25.4 (release, x86_64-unknown-linux-gnu) v8 10.7.193.3 typescript 4.7.4 kkaravaev@kkaravaev1:~$ npm -v 8.19.4 kkaravaev@kkaravaev1:~$ Complete error message: Sending fatal alert BadCertificate Sending fatal alert BadCertificate error: error sending request for url (https://deno.land/x/cliffy@v0.20.1/command/mod.ts): error trying to connect: invalid peer certificate contents: invalid peer certificate: UnknownIssuer at file:///home/kkaravaev/2222.kpmi-invest-legacy-web/node_modules/eftr-tools/_cli/_deps/cliffy/cliffy.ts:2:15 npm ERR! code 1 npm ERR! path /home/kkaravaev/2222.kpmi-invest-legacy-web npm ERR! command failed npm ERR! command sh -c -- ./ci_post_install.sh && patch-package npm ERR! A complete log of this run can be found in: npm ERR! /home/kkaravaev/.npm/_logs/2024-06-24T13_57_52_382Z-debug-0.lo
5 Replies
Klimenty
Klimenty2w ago
Is there a way to disable whatever checks Deno is doing so that I can avoid that error?
pyrote
pyrote2w ago
Have you ran, sudo apt-get upgrade ca-certificates The UnknownIssuer message makes it seem like Deno can't find a valid certificate and you may not have the latest one for Let's Encrypt. Can you upgrade your version of Deno? That version is a few years old.
Klimenty
Klimenty2w ago
I cannot upgrade Deno the project requires this version for some reason. Updating didn't help Does Deno use Let's Encrypt?
pyrote
pyrote2w ago
Yes deno.land is using a Let's Encrypt certificate. I installed 1.25.4 on a Ubuntu 22.04.4 LTS machine and can load that cliffy module. Just running a file with,
import * as cliffy from "https://deno.land/x/cliffy@v0.20.1/command/mod.ts"
import * as cliffy from "https://deno.land/x/cliffy@v0.20.1/command/mod.ts"
downloads the module correctly. Try running that as a test and see if it downloads the module in your environment.
Klimenty
Klimenty2w ago
I fixed it by adding Let's Encrypt and some other Root CA certificates to my system. Not sure which one fixed it for me but I am now able to run the Deno script without any errors. Thank you for your guidance @pyrote
More Posts
'React' refers to a UMD global, but the current file is a module.I am using Deno with the GitHub Actions, and my `linting` is getting passed but I don't know what isCan I transpile TypeScript Code to JavaScript Code with Deno like BunHey I have 10/15 typescript files. SO can i transpile it into javascript code?Passing props to component from layoutI'm trying to pass some client side data from layout to route component, how do I pass this in? I trParsing Typescript with deno_core and deno_ast fails on type annotationsHey all, i'm trying to embed deno into my app so that users can write config file in typescript. Iintercept an op rust-side and call the original fnHi, i'm using `deno_core` and some exts embedded in a desktop application, and am trying to replace Why Deno runtime is differently when running locally or through Deno Cloud?FYI: I did already post into the [deploy feedback](https://github.com/denoland/deploy_feedback/issueDeno JSR API package + CLI entrypoint "best-practices"Hey 👋 I have a package that is both a CLI and provides a JS API. Previously with `deno.land/x`, thFormatting with VSCode adds a tab instead of 2 spacesHi, I'm experiencing a weird behavior in VSCode. I'm formatting a new Typescript file however it addType-narrowing/covariance/contravarianceWhy is it that `5` has type `5` but `{five:5}` has type `{five:number}` and not `{five:5}`?Ensure error is of type unknown with Deno lintI'm having an interesting issue in a `catch (error) {` block. The issue is resolved when I change it