i downloaded mongoose without paying attention to the version . The latest version (7.0.1) was installed and listed as a dependency in package.json
In section 8 of the Node course, there is a project named ‘vidly’. To connect to the database we use
I got error "cannot connect to mongo database’
When i checked the exercise solution i noticed that mongoose v.5.0.2 was being used. Installing the earlier version solved the connection problem.
According to ChatAI, v.7 caused a breaking of the connection. Check ChatAi with this query…
“why does mongoose.connect not work with mongoose version 7”