# Typescript express-jwt - This expression is not callable Error

**URL:** <https://community.auth0.com/t/typescript-express-jwt-this-expression-is-not-callable-error/86147>\
**Category:** Get Help\
**Tags:** nodejs, jwt, express-jwt, typescript, auth0\
**Created:** [June 29, 2022, 12:17pm UTC](https://community.auth0.com/t/typescript-express-jwt-this-expression-is-not-callable-error/86147 "2022-06-29T12:17:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mez](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mez/32/34289_2.png) [@mez](https://community.auth0.com/u/mez)\
**Post date:** [June 29, 2022, 12:17pm UTC](https://community.auth0.com/t/typescript-express-jwt-this-expression-is-not-callable-error/86147/1 "2022-06-29T12:17:02Z")

</div>

Defining the constant

> Blockquote  
> export const checkJwt = jwt({  
> secret: jwksRsa.expressJwtSecret({  
> cache: true,  
> rateLimit: true,  
> jwksRequestsPerMinute: 5,  
> jwksUri: `https://${process.env.AUTH0_DOMAIN}/.well-known/jwks.json`  
> }),

// Validate the audience and the issuer.  
audience: process.env.AUTH0\_AUDIENCE,  
issuer: `https://${process.env.AUTH0_DOMAIN}/`,  
algorithms: [“RS256”]  
});  
Throws an exception stating that jwt() This expression is not callable. and node\_modules/express-jwt/dist/index"’ has no call signatures.ts(2349)

How do you resolve this issue?

---

<div class="post-metadata">

**Author:** ![dima-friedman](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dima-friedman/32/39710_2.png) [@dima-friedman](https://community.auth0.com/u/dima-friedman)\
**Post date:** [September 3, 2022, 12:29am UTC](https://community.auth0.com/t/typescript-express-jwt-this-expression-is-not-callable-error/86147/2 "2022-09-03T00:29:34Z")

</div>

They updated both libraries you use.  
Now import like that:  
import {expressjwt} from ‘express-jwt’;  
import { expressJwtSecret } from ‘jwks-rsa’;

and cast “as GetVerificationKey;” to the “expressJwtSecret”

---

<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:** [May 16, 2024, 6:50pm UTC](https://community.auth0.com/t/typescript-express-jwt-this-expression-is-not-callable-error/86147/3 "2024-05-16T18:50:30Z")

</div>

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