dnsimple-node
dnsimple-node copied to clipboard
Library broken on NodeJS 20
Every endpoint I hit with this client gives this generic error
The "listener" argument must be of type function. Received an instance of Object
Tried with the latest npm version, the latest github release (labelled v8.0.0, v7.4.0 in package.json), and the master branch. All giving this same issue. API works fine over curl or fetch. with the same token & endpoint.
Example usage
this.client = new DNSimple({
accessToken: process.env.DNSIMPLE_ACCESS_TOKEN,
})
console.log(await this.client.identity.whoami());
// throws: The "listener" argument must be of type function. Received an instance of Object
Hi @kevinroleke!
Thanks for reporting this bug.
I haven't been able to reproduce the error. This is the script I'm trying:
import {DNSimple} from 'dnsimple'
const client = new DNSimple({
accessToken: "THE TOKEN",
});
const response = await client.identity.whoami();
console.log(response);
I've tried with NodeJS versions v21.6.2 and v20.15.0, and the dnsimple module version 7.4.0
Could you provide more information about your setup, please?
Closing as stale. Please reopen the ticket with further information and we will be happy to help ;)