Adding Member using admin api with nextjs 14 app router

Fill out the following bug report template with as much detail as possible!
I am getting error:

TypeError: invalid ‘instanceof’ operand KeyObject

My ghost-client.js code:

export function addMember(email) {
return admin.members.add(
{ email },
{ send_email: true, email_type: ‘subscribe’ });
}

Are you sure this is a bug? If you just need help, post in the developer help category. If it’s a feature request, head to the ideas category.


Issue Summary

  • Explain roughly what’s wrong
  • What did you expect to happen?

Steps to Reproduce

  1. This is the first step…
  2. This is the second step, etc.

Setup information

Ghost Version
[5.85.1]

Node.js Version
18

How did you install Ghost?
Self Hosted

Provide details of your host & operating system
Include further details about your hosting and OS.

Database type
MySQL 5.7 / MySQL 8 / SQLite 3 / Other

Browser & OS version
Include if reporting frontend bugs.

Relevant log / error output
Copy and paste any relevant log output. Use backticks to format this into code.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.