By default, NodeJs hardcodes the Mozilla set of CA
into the binary instead of using openSSL or any other library, and does not provide a way to add new ones.
You must pass --use-openssl-ca to node, see here
on using openSSL so it reads your system CA store.
To import your new trusted CA in ubuntu. Do the following
.crt extension, don't try to be clever and skip this/etc/ca-certificates.conf, with the .crt extensionsudo update-ca-certificatesFAQ:
update-ca-certificates script have very different behavior on different distro despite sharing the same namehttps://wiki.archlinux.org/title/User:Grawity/Adding_a_trusted_CA_certificate