# Do Actions still not support ESM?

**URL:** <https://community.auth0.com/t/do-actions-still-not-support-esm/151299>\
**Category:** Get Help\
**Tags:** login-experience, new-universal-login-experience\
**Created:** [November 11, 2024, 9:03pm UTC](https://community.auth0.com/t/do-actions-still-not-support-esm/151299 "2024-11-11T21:03:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![brett.rogerson](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/brett.rogerson/32/62097_2.png) [@brett.rogerson](https://community.auth0.com/u/brett.rogerson)\
**Post date:** [November 11, 2024, 9:03pm UTC](https://community.auth0.com/t/do-actions-still-not-support-esm/151299/1 "2024-11-11T21:03:52Z")

</div>

Ready to post? 🔍 First, try searching for your answer.  
Hello,

I’m looking into creating an `onExecutePostLogin` action and was wondering if I’m able to use ESM for this?

```auto
import { ManagementClient } from 'auth0';

/**
 * Handler that will be called during the execution of a PostLogin flow.
 *
 * @param {Event} event - Details about the user and the context in which they are logging in.
 * @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.
 */
export async function onExecutePostLogin(event, api) {}

```

I see on the auth0-node library that ESM is currently supported, was wondering if that translates to Actions?

Also, will you be moving to latest node LTS anytime soon?

Thanks!

---

<div class="post-metadata">

**Author:** ![brett.rogerson](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/brett.rogerson/32/62097_2.png) [@brett.rogerson](https://community.auth0.com/u/brett.rogerson)\
**Post date:** [November 11, 2024, 9:24pm UTC](https://community.auth0.com/t/do-actions-still-not-support-esm/151299/2 "2024-11-11T21:24:11Z")

</div>

I’m also a bit confused as I see this in the Actions editor which seems to imply Typescript is supported:

 ![image](https://global.discourse-cdn.com/auth0/original/3X/e/e/ee872d86e75d8662bce870fa65dcff0a7b463de0.png)

But then here in Actions limitations, it says Typescript is not supported:

 ![image](https://global.discourse-cdn.com/auth0/original/3X/3/8/38248056f01aeea174adf342aec81d8f8320ca5f.png)

---

<div class="post-metadata">

**Author:** ![vlad.murarasu](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vlad.murarasu/32/72793_2.png) [@vlad.murarasu](https://community.auth0.com/u/vlad.murarasu)\
**Post date:** [March 31, 2025, 7:26pm UTC](https://community.auth0.com/t/do-actions-still-not-support-esm/151299/4 "2025-03-31T19:26:31Z")

</div>

Hi @brett.rogerson,

Welcome to the Auth0 Community.

If you want to use Node.js modules you will first need to add them to your dependencies in your action and then add it in your code using the `require()` method.

Example:

```javascript
exports.onExecutePostLogin = async (event, api) => {
  const ManagementClient = require('auth0').ManagementClient;
}

```

About the tutorial message saying that Typescript is supported, I’ve just tested it myself, Typescript is not supported. I’m not sure why it’s saying it is. I will have to bring it up internally.

If you have any other question for us feel free to let us know.

Have a good one,  
Vlad

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [April 14, 2025, 7:27pm UTC](https://community.auth0.com/t/do-actions-still-not-support-esm/151299/5 "2025-04-14T19:27:01Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
