I am following the ldapjs guide and using the /etc/passwd server code example. It's working fine with the ldapsearch commands, but I get an Operations error (1) when adding a new entry with ldapadd.
pi@radiuspi:~/code/ldap $ sudo ldapadd -H ldap://localhost:1389 -x -D cn=root -w secret -f ./user.ldif
adding new entry "cn=ldapjs, ou=users, o=myhost"
ldap_add: Operations error (1)
matched DN: ou=users,o=myhost
It successfully reads the user.ldif file since it's adding a new entry for cn=ldapjs.
dn: cn=ldapjs, ou=users, o=myhost
objectClass: unixUser
cn: ldapjs
shell: /bin/bash
description: Created via ldapadd
But afterwards it shows the Operations error. I don't know why it still prints the matched DN: ou=users,o=myhost line, but it does not add the new entry when verifying with ldapsearch.
The ssh terminals with the ldap server and commands:

The ldap server is started with root/sudo. I have tried this on both WSL Ubuntu and on a Raspberry Pi with the same error.
- Node.js v20.5.1, ldap-utils 2.4.57