I have a local, strapi app (that I have in a git repo) that I want to migrate from using sqlite3 to using mongodb
I have done the following:
created a 2nd, temporary, strapi app that is successfully using mongodb from the start (so I have a good mongo instance running locally)
copied the database.json content from the temp, working-mongodb, strapi app to my existing one. (made sure was in development and ran development version)
From my existing app (from which I want to use mongodb), I
uninstalled:
strapi-hook-bookshelf
strapi-hook-knex
knex
sqlite3
installed strapi-hook-mongoose
NOTES:
- the existing app (from which i want to use mongodb) runs successfully if I keep just keep using sqlite3.
- i created the existing app using the quickstart option
But, I still get this error...terminal output, snippet below
Terminal Output Snippet:
(node:37499) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
(node:37499) UnhandledPromiseRejectionWarning: TypeError: orm.load(...).buildQuery is not a function
at buildQuery (/Users/monico_a_moreno/source/.../folder-strapi-poc/node_modules/strapi-utils/lib/buildQuery.js:122:21)
at Object.count (/Users/monico_a_moreno/source/.../folder-strapi-poc/node_modules/strapi-plugin-users-permissions/config/queries/mongoose.js:18:12)
at Object.initialize (/Users/monico_a_moreno/source/.../folder-strapi-poc/node_modules/strapi-plugin-users-permissions/services/UsersPermissions.js:502:8)
at module.exports (/Users/monico_a_moreno/source/.../folder-strapi-poc/node_modules/strapi-plugin-users-permissions/config/functions/bootstrap.js:156:65)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:37499) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:37499) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[2019-07-03T18:27:15.985Z] warn The bootstrap function is taking unusually long to execute (3500 miliseconds).
[2019-07-03T18:27:15.986Z] warn Make sure you call it?
What am I doing wrong?