Skip to content

[Bug]: Message.syncWithMeili and Message.syncWithMeili "not a function" #1506

Closed Answered by danny-avila
feeloow asked this question in Troubleshooting
Discussion options

You must be logged in to vote

Thanks for reporting this. Adding back to issues as I've identified what was causing it.

For some reason, mongoose's execution order is starting before the .env file is loaded. There was nothing that should've changed this, but adding more operations at server initialization may have had this unintended effect on the call stack.

Adding require('dotenv').config(); to top of /server/index.js fixes this

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by feeloow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
3 participants
Converted from issue

This discussion was converted from issue #1504 on January 07, 2024 15:57.