@Thadeusz-Lay so are you trying to create your own plugin? meta is a NodeBB module. You have to require it from NodeBB with require.main.require('./src/meta') on the server side.
OpenLDAP Plugin with Group Sync
I wrote a plugin for OpenLDAP.
It overrides the default login and falls back to local login if the user is not found in LDAP.
It also creates all groups found in LDAP and automatically joins the user into them.
Using it as an alternative login is not implemented as I couldn't figure it out quick enough. It should be easy to do - feel free to add a pull request.
The source is on github. Pull requests are welcome!