# Adding Member using admin api with nextjs 14 app router

**URL:** <https://forum.ghost.org/t/adding-member-using-admin-api-with-nextjs-14-app-router/48467>\
**Category:** Developer help\
**Created:** [June 27, 2024, 11:48pm UTC](https://forum.ghost.org/t/adding-member-using-admin-api-with-nextjs-14-app-router/48467 "2024-06-27T23:48:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hexpit](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/hexpit/32/31019_2.png) [@hexpit](https://forum.ghost.org/u/hexpit)\
**Post date:** [June 27, 2024, 11:48pm UTC](https://forum.ghost.org/t/adding-member-using-admin-api-with-nextjs-14-app-router/48467/1 "2024-06-27T23:48:27Z")

</div>

_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.`

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/b/ba9ce5100b8bb264586f4f572545596b2ce3f081.png) [@system](https://forum.ghost.org/u/system)\
**Post date:** [September 25, 2024, 11:48pm UTC](https://forum.ghost.org/t/adding-member-using-admin-api-with-nextjs-14-app-router/48467/2 "2024-09-25T23:48:51Z")

</div>

Closed on September 25, 2024, 11:48pm UTC

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