TryGhost / Ghost

Independent technology for modern publishing, memberships, subscriptions and newsletters.
https://ghost.org
MIT License
47.03k stars 10.23k forks source link

I am getting TypeError: invalid 'instanceof' operand KeyObject error while adding member using Ghost Admin API #20409

Closed developervijay7 closed 3 months ago

developervijay7 commented 3 months ago

Issue Summary

I am getting TypeError: invalid 'instanceof' operand KeyObject error while adding member using Ghost Admin API

Steps to Reproduce

export async function addMember(email) { return await admin.members.add({"members":[{"email": email}]}, {send_email: true, email_type: 'subscribe'}) .then(response => console.log(response)) .catch(error => console.error(error)) }

Ghost Version

5.84.1

Node.js Version

18

How did you install Ghost?

Local

Database type

MySQL 8

Browser & OS version

No response

Relevant log / error output

No response

Code of Conduct

kevinansfield commented 3 months ago

It sounds like this may be related to jsonwebtoken usage based on this upstream issue https://github.com/auth0/node-jsonwebtoken/issues/950

However the version in question was updated in our Admin-API package over a year ago and we haven't had any other reports of issues. @developervijay7 your issue doesn't provide any details on the environment you're using the Admin-API package in or how you're instantiating it etc so it's difficult to reproduce or help.

As this sounds environment related please open a support topic on our forum. If there's a reproducible bug found after investigating then we can re-open an actionable issue. Thanks.

github-actions[bot] commented 3 months ago

Hey @developervijay7 👋 We ask that you please do not use GitHub for help or support 😄. We use GitHub solely for bug-tracking and community-driven development.

Many questions can be answered by reviewing our documentation. If you can't find an answer then our forum is a great place to get community support, plus it helps create a central location for searching problems/solutions.

FYI: Many projects use issue templates to point you in the right direction. Reading the guidelines or issue templates before opening issues can save you and project maintainers valuable time.