Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to fix: TypeError: Client is not a constructor #236

Open
Koch-Abrams opened this issue Oct 23, 2023 · 1 comment
Open

How to fix: TypeError: Client is not a constructor #236

Koch-Abrams opened this issue Oct 23, 2023 · 1 comment
Labels
question❓ Further information is requested

Comments

@Koch-Abrams
Copy link

Koch-Abrams commented Oct 23, 2023

Node-beginner here. I can't find a fix for the error message above, when declaring a new myClient variable.

Error message:

file:///Users/christopher.koch/dev/node_test/test.js:3
const myClient = new Client({ leagueId: 432132 });
                 ^

TypeError: Client is not a constructor
    at file:///Users/christopher.koch/dev/node_test/test.js:3:18
    at ModuleJob.run (node:internal/modules/esm/module_job:217:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)
    at async loadESM (node:internal/process/esm_loader:34:7)
    at async handleMainPromise (node:internal/modules/run_main:66:12)

Node.js v20.8.0

Can someone tell me what i'm doing wrong?

@mkreiser
Copy link
Owner

This likely means you are importing the Client class incorrectly. Can you post more of the test.js file?

@mkreiser mkreiser added the question❓ Further information is requested label Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question❓ Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants