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

TypeError: Mattermost.Client is not a constructor #389

Open
0xSkyzoX opened this issue May 7, 2023 · 1 comment
Open

TypeError: Mattermost.Client is not a constructor #389

0xSkyzoX opened this issue May 7, 2023 · 1 comment

Comments

@0xSkyzoX
Copy link

0xSkyzoX commented May 7, 2023

const mattermostClient = new Mattermost.Client(MATTERMOST_SERVER_URL)
^

TypeError: Mattermost.Client is not a constructor
at Object. (/home/skyzox/Documents/projects/dws-agent/src/index.js:22:26)
at Module._compile (node:internal/modules/cjs/loader:1218:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
at Module.load (node:internal/modules/cjs/loader:1081:32)
at Module._load (node:internal/modules/cjs/loader:922:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47

Node.js v18.13.0

@PeterPilley
Copy link

are you using typescript or commonjs?

you should be able to go const MatterMostClient = require('mattermost-client')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants