Cannot Atlas Search using node.js driver

I have a Mongo Atlas cluster, and I am attempting to create search index but I am receiving the error below:

[ERROR] 16:31:19 TypeError: this._collection.createSearchIndex is not a function

where this._collection is an instance of the collection I am attempting to create the Atlas Search Index on.

My cluster is M30, running version 7.0.12. The role established the connection has readWriteAnyDatabase. My current version of the mongodb npm package is 6.8.0.

I have attempted to dig through the docs but cannot seem to figure out what is going wrong. If anyone has suggestions, please let me know. Thanks!

As it turns out, my issue was the mongo connection was being established through another npm package of version 4.11.0. Once I upgraded to latest, it worked light a charm.