TypeError: _this.provider is not a function

I’m trying to use microsoft-graph-client api to get user data. I’m using nodejs and javascript I was able to login using graph api but unable to get user data. You can check the code from this blogs

to get user data:
https://docs.microsoft.com/en-us/graph/api/user-get?view=graph-rest-1.0&tabs=javascript

to get authClient value:
https://docs.microsoft.com/en-us/graph/sdks/choose-authentication-providers?tabs=Javascript#authorization-code-provider

Here’s the full error:
TypeError: _this.provider is not a function

at C:….CustomAuthenticationProvider.js:43:31

at new Promise ()

at CustomAuthenticationProvider. (C:….CustomAuthenticationProvider.js:42:39)

at step (C:….node_modulestslibtslib.js:143:27)

at Object.next (C:….node_modulestslibtslib.js:124:57)

at C:….node_modulestslibtslib.js:117:75

at new Promise ()

at __awaiter (C:…..node_modulestslibtslib.js:113:16)

at CustomAuthenticationProvider.getAccessToken (C:….node_modules@microsoftmicrosoft-graph-clientlibsrcCustomAuthenticationProvider.js:39:3

at AuthenticationHandler. (C:…node_modules@microsoftmicrosoft-graph-clientlibsrcmiddlewareAuthenticationHandler.js:62:69)

{
statusCode: -1,
code: ‘TypeError’,
requestId: null,
body: ‘TypeError: _this.provider is not a function’
}