magic-mirror-demo icon indicating copy to clipboard operation
magic-mirror-demo copied to clipboard

NPM update causes problems

Open DENightOne opened this issue 8 years ago • 2 comments

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

DENightOne avatar Dec 30 '16 11:12 DENightOne

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 [email protected]: 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"

DENightOne avatar Jan 02 '17 21:01 DENightOne

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, });

DENightOne avatar Oct 02 '17 18:10 DENightOne