# Node.js SDK - TypeScript error

**URL:** <https://forums.nylas.com/t/node-js-sdk-typescript-error/628>\
**Category:** Question and Answers\
**Tags:** email-api, calendar-api\
**Created:** [February 14, 2025, 8:16pm UTC](https://forums.nylas.com/t/node-js-sdk-typescript-error/628 "2025-02-14T20:16:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wander](https://avatars.discourse-cdn.com/v4/letter/w/d78d45/32.png) [@wander](https://forums.nylas.com/u/wander)\
**Post date:** [February 14, 2025, 8:16pm UTC](https://forums.nylas.com/t/node-js-sdk-typescript-error/628/1 "2025-02-14T20:16:13Z")

</div>

Hi! We are migrating part of our code base to ESM modules and we are getting a TS error saying :

This expression is not constructable"  
Type ’ type of …/node\_modules/lig/types/nylas’ has no construct signatures.

It seems to have no bad side effects based on our tests so far but it’s a bit a scary error. We are using TypeScript 5.5.3 (tried 5.7.3 with no luck) and Nylas SDK 7.7.4.

**Sample code:**  
import Nylas from ‘nylas’;  
…  
const client = new Nylas(  
{ apiKey: NylasConfig.apiKey, apiUri: NylasConfig.apiUri }  
);

---

<div class="post-metadata">

**Author:** ![ram](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.nylas.com/ram/32/3_2.png) [@ram](https://forums.nylas.com/u/ram)\
**Post date:** [February 19, 2025, 8:09pm UTC](https://forums.nylas.com/t/node-js-sdk-typescript-error/628/2 "2025-02-19T20:09:00Z")

</div>

@wander thanks for posting, the [code sample seems to be correct based on our docs](https://developer.nylas.com/docs/v3/sdks/node/#initialize-the-nylas-object):

```auto
import Nylas from "nylas";

const nylas = new Nylas({
  apiKey: "<NYLAS_API_KEY>",
  apiUri: "<NYLAS_API_URI>"
})   

```

Let me take this back to the team to take a look at - but to confirm, this does not impact functionality, just generated a TS error?

---

<div class="post-metadata">

**Author:** ![wander](https://avatars.discourse-cdn.com/v4/letter/w/d78d45/32.png) [@wander](https://forums.nylas.com/u/wander)\
**Post date:** [February 19, 2025, 9:00pm UTC](https://forums.nylas.com/t/node-js-sdk-typescript-error/628/3 "2025-02-19T21:00:35Z")

</div>

As far as we can tell (e.g. up to the point we tested things) it seems to not affect functionality. So far it seems to be just a TS type error that does not translate into the JS level.
