Open DENightOne opened 7 years ago
Short follow up: After rolling back the npm modules one by one I found that the upgrade of mongoose created the issue... version 4.4.19 works fine...the latest vertion 4.7.5 breaks the connection as described above...
When i run npm update mongoose I think the error above might have something to so with the error i get when rolling back:
npm WARN deprecated mongodb@2.1.18: Please use 2.2.16 or higher due to a regression in updateOne/Many upsertedId return
Rolled back and now mirror workes again.... Quote: "Dont fix something thats not broken"
UPDATE:///this breaks something else :(
Changing the connection string in server.js makes the problem go away (meaning I don't know if I broke anything else)
mongoose.connect(connectionString, { useMongoClient: true, });
Like an idiot i did a simple npm update on my project folder and killed the project...
Everything has been working fine for months without issues.. Now i get the following error on start, seems to be trying to start mongo and fails
D:\mm\node_modules\mongodb-core\lib\topologies\server.js:353 throw MongoError.create(f('server instance in invalid state %s', self.s.state)); ^ MongoError: server instance in invalid state undefined at Function.MongoError.create (D:\mm\node_modules\mongodb-core\lib\error.js:29:11) at Server.connect (D:\mm\node_modules\mongodb-core\lib\topologies\server.js:353:21) at Server.connect (D:\mm\node_modules\mongodb\lib\server.js:361:17) at new MongoStore (D:\mm\node_modules\connect-mongodb\lib\connect-mongodb.js:93:19) at Object. (D:\mm\server.js:67:12)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.runMain (module.js:605:10)
at run (bootstrap_node.js:420:7)
at startup (bootstrap_node.js:139:9)
at bootstrap_node.js:535:3