13 Oct 2023 11:28 AM
Hello,
I'm trying first steps with building a Dynatrace App. Got a demo app and taking my steps from there, but I have no experience in typescript nor nodejs coding.
I'm trying to use the 'tls' module included in nodejs within an api of my app. So I have this in my api typescript:
let tls;
try {
tls = await import('node:tls');
} catch (err) {
console.error('tls support is disabled!');
}
When I run that app in the dev server I get an error:
Error: Cannot import module 'node:tls'.
I guess this is a very general question, what is happening here and why are built-in modules not available?
kr
Solved! Go to Solution.
13 Oct 2023 11:36 AM - edited 13 Oct 2023 11:36 AM
Hi @r_weber
The Dynatrace JavaScript runtime will provide a compatibility layer for Node.js to improve compatibility with third-party npm packages. This is currently not possible.
On the page about the Dynatrace JavaScript runtime we will add an section about which node modules will be supported.
So currently no node modules are available as part of the Dynatrace JavaScript runtime.
Best,
Sini
16 Oct 2023 04:39 AM
Actually, there are quite some node modules already supported. The content on https://developer.dynatrace.com/reference/javascript-runtime/ will soon be updated as soon as all changes are rolled out.
However, node:tls
won't be supported. @r_weber can you tell me what you want to do with this module?
16 Oct 2023 08:35 AM
Hi @stefan_eggersto ,
I want to migrate my Advanced SSL Check Plugin to an app. For that I need low level access to TLS.
kr,
Reinhard
17 Oct 2023 06:52 AM
I just checked various ways to access certificate information, but it seems like this is not yet possible.
I'll ask the team to respond if they plan to allow access to certificate information.
23 Oct 2023 08:51 AM
Hi @r_weber,
We are currently evaluating support for the `node:tls` module.
Could you specify which of the modules APIs you'd need to use?
23 Oct 2023 09:14 AM
Hi @silvio
thanks for the update.
As it is with development, sometimes you do not know what you will be needing, only during development things will unfold.
kr