Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got mongooseElastic is not a function on V3.0.0 #7

Open
goffle opened this issue Feb 11, 2022 · 0 comments
Open

Got mongooseElastic is not a function on V3.0.0 #7

goffle opened this issue Feb 11, 2022 · 0 comments

Comments

@goffle
Copy link
Contributor

goffle commented Feb 11, 2022

I have this message :
TypeError: mongooseElastic is not a function

for the following code :

const mongooseElastic = require("@selego/mongoose-elastic");

...

Schema.plugin(mongooseElastic(esClient, { ignore: ["metadata"] }), MODELNAME);

I fixed it my side by doing this :

mongooseElastic.default(esClient, { ignore: ["metadata"] })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant