-
Notifications
You must be signed in to change notification settings - Fork 17
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
Getting TypeError: Client is not a constructor #175
Comments
I would strongly recommend to switch to TypeScript. Remove the typings in the example code and use this line to get the client Find the js example example below.
|
Ok. So I've tried your example with es modules. It works, but there's a weird thing I had to do to get it working. import Client from 'nextcloud-node-client';
console.log(Client.default);
(async () => {
const client = new Client.default();
console.log('Should work without any errors`);
})(); You maybe should put that in your documentation. |
Describe the bug
When trying to initialize the client like this:
I get:
To Reproduce
Expected behavior
Client should get initialized without any trouble
Additional context
Tried it with various TS configs and JS EMS syntax
The text was updated successfully, but these errors were encountered: