dnsimple-node icon indicating copy to clipboard operation
dnsimple-node copied to clipboard

Library broken on NodeJS 20

Open kevinroleke opened this issue 1 year ago • 1 comments

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

kevinroleke avatar Jun 18 '24 20:06 kevinroleke

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?

ggalmazor avatar Jul 01 '24 16:07 ggalmazor

Closing as stale. Please reopen the ticket with further information and we will be happy to help ;)

ggalmazor avatar Oct 09 '24 17:10 ggalmazor