# Using node modules in Apps

**URL:** <https://community.dynatrace.com/t/using-node-modules-in-apps/42077>\
**Category:** Developer Q&A Forum\
**Tags:** dynatrace-app-toolkit, app-functions\
**Created:** [October 13, 2023, 10:28am UTC](https://community.dynatrace.com/t/using-node-modules-in-apps/42077 "2023-10-13T10:28:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![r\_weber](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/r_weber/32/24884_2.png) [@r\_weber](https://community.dynatrace.com/u/r_weber)\
**Post date:** [October 13, 2023, 10:28am UTC](https://community.dynatrace.com/t/using-node-modules-in-apps/42077/1 "2023-10-13T10:28:50Z")

</div>

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](https://nodejs.org/api/tls.html) within an api of my app. So I have this in my api typescript:

```javascript
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

---

<div class="post-metadata">

**Author:** ![sinisa\_zubic](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/sinisa_zubic/32/32498_2.png) [@sinisa\_zubic](https://community.dynatrace.com/u/sinisa_zubic)\
**Post date:** [October 13, 2023, 10:36am UTC](https://community.dynatrace.com/t/using-node-modules-in-apps/42077/2 "2023-10-13T10:36:01Z")

</div>

Hi&nbsp;[@r\_weber](https://community.dynatrace.com/user/35901)

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](https://developer.dynatrace.com/reference/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

---

<div class="post-metadata">

**Author:** ![stefan\_eggersto](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/stefan_eggersto/32/34114_2.png) [@stefan\_eggersto](https://community.dynatrace.com/u/stefan_eggersto)\
**Post date:** [October 16, 2023, 3:39am UTC](https://community.dynatrace.com/t/using-node-modules-in-apps/42077/3 "2023-10-16T03:39:19Z")

</div>

Actually, there are quite some node modules already supported. The content on&nbsp;[JavaScript runtime | Dynatrace Developer](https://developer.dynatrace.com/reference/javascript-runtime/)&nbsp;will soon be updated as soon as all changes are rolled out.

However, `node:tls`&nbsp;won’t be supported.&nbsp;[@r\_weber](https://community.dynatrace.com/user/35901)&nbsp;can you tell me what you want to do with this module?

---

<div class="post-metadata">

**Author:** ![r\_weber](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/r_weber/32/24884_2.png) [@r\_weber](https://community.dynatrace.com/u/r_weber)\
**Post date:** [October 16, 2023, 7:35am UTC](https://community.dynatrace.com/t/using-node-modules-in-apps/42077/4 "2023-10-16T07:35:24Z")

</div>

Hi&nbsp;[@stefan\_eggersto](https://community.dynatrace.com/user/9516)&nbsp;,

I want to migrate my [Advanced SSL Check Plugin](https://github.com/360Performance/dynatrace-plugin-certcheck) to an app. For that I need low level access to TLS.

kr,  
Reinhard

---

<div class="post-metadata">

**Author:** ![stefan\_eggersto](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/stefan_eggersto/32/34114_2.png) [@stefan\_eggersto](https://community.dynatrace.com/u/stefan_eggersto)\
**Post date:** [October 17, 2023, 5:52am UTC](https://community.dynatrace.com/t/using-node-modules-in-apps/42077/5 "2023-10-17T05:52:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![silvio](https://avatars.discourse-cdn.com/v4/letter/s/cdc98d/32.png) [@silvio](https://community.dynatrace.com/u/silvio)\
**Post date:** [October 23, 2023, 7:51am UTC](https://community.dynatrace.com/t/using-node-modules-in-apps/42077/6 "2023-10-23T07:51:14Z")

</div>

Hi&nbsp;[@r\_weber](https://community.dynatrace.com/user/35901),

We are currently evaluating support for the `node:tls` module.  
Could you specify which of the modules APIs you’d need to use?

---

<div class="post-metadata">

**Author:** ![r\_weber](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/r_weber/32/24884_2.png) [@r\_weber](https://community.dynatrace.com/u/r_weber)\
**Post date:** [October 23, 2023, 8:14am UTC](https://community.dynatrace.com/t/using-node-modules-in-apps/42077/7 "2023-10-23T08:14:51Z")

</div>

Hi&nbsp;[@silvio](https://community.dynatrace.com/user/61143)

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
