Function updateDoc() called with invalid data. Unsupported field value: a custom __PRIVATE_ArrayRemoveFieldValueImpl object

I’m trying to run arrayRemove() and returns with an error:

Uncaught (in promise) FirebaseError: Function updateDoc() called with invalid data. Unsupported field value: a custom __PRIVATE_ArrayRemoveFieldValueImpl object (found in field present in document…

This is the code that calls arrayRemove():

            if (document.getElementById(meeting+members[i]['uid']+'false')) {
                    console.log(members[i]['uid'])
                await updateDoc(doc(db, 'clubs', props.clubId, 'attendance', meeting), {
                    present: arrayRemove(members[i]['uid'])
                })
                }

Tried to change the argument of arrayRemove and had the same error.