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 use it #45

Open
Al-Bsharat opened this issue Mar 8, 2022 · 0 comments
Open

How to use it #45

Al-Bsharat opened this issue Mar 8, 2022 · 0 comments

Comments

@Al-Bsharat
Copy link

Hello,
I tried to use the module but every time I got

is not a function

My code:

var whmcs_client = new WHMCS(config);

const parameters = {
limitstart: 0,
limitnum: 10
};

whmcs_client.users.getUsers(parameters)
.then(details => {
console.log(details);
})
.catch(err => {
console.log(err);
});

The error:

whmcs_client.users.getUsers(parameters)
^

TypeError: Cannot read properties of undefined (reading 'getUsers')
at Object. (D:\GitHub Rep\WebStrom Projects\BTCPayDetection\whmcsInteraction.js:19:20)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
at node:internal/main/run_main_module:17:47

What is wrong with my code?

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

1 participant