For some reason, I am unable to run both databases at the same time. If I comment one connection out of the connections array, everything works, however, if I use both of them, I get forestadmin error screen.
Thank you for your response. I have investigated this for many hours and I am facing one small issue. I have now modified it so that I don’t need to divide my schemas into subfolders because of using multiple databases and hosting them from one single index.ts and one models folder. As you can see, this simplifies certain aspects. Therefore, when I try to run the project, I am unable to. However, if I comment out one connection, the other schemas work and vice versa.
When I try to run forest schema:update from my root folder or my dist folder, I get the error
× The configuration file “/Users/tanishpanjwani/Desktop/dibsy/dibsy-dev/v1/dibsy-forest/config/databases.js” does not exist.
× An unexpected error occurred. Please reach out for help in our Developers community (https://community.forestadmin.com/) or create a Github issue with following error: databasesConfig.map is not a function
I have tried changing directories, and even tried by changing sourceMap value in my tsconfig file but to no avail
I was able to resolve the issue after much refactoring and trial and error. It seems that I was partially following this document Plug multiple NoSQL databases - Documentation which is very outdated and misleading causing me more confusion. The forest admin community post here ISSUE: Plug multiple NoSQL databases was much more helpful in helping me resolve the issue. I request you to update or remove the article.