Jay M
Jay M

Reputation: 269

Mongoose/MongoDB Error: Cannot determine state of server

Suddenly, I started getting this error when running my app locally. As far as I'm know, I made no changes between the last time it was working and now. It seems to be an error on the database layer because it happens when the app tries to do some DB related task.

I have tried upgrading node, npm, mongoose, mongodb and I still get the same error.

There's a lot of information I could provide but I have no idea what would be most relevant so let me know what else would be needed to help solve this problem.

I have also attached my current package.json

error displayed in browser

{

  "engines": {
    "node": "0.10.x",
    "npm": "1.4.x"
  },
  "scripts": {
    "start": "grunt",
    "test": "grunt test",
    "postinstall": "bower install --config.interactive=false && node ./bson.installation.fix.js"
  },
  "dependencies": {
    "angular": "^1.5.0",
    "async": "~0.9.0",
    "body-parser": "~1.9.0",
    "bower": "~1.3.8",
    "chalk": "~0.5",
    "compression": "~1.2.0",
    "connect-flash": "~0.1.1",
    "connect-mongo": "^0.4.1",
    "consolidate": "~0.10.0",
    "cookie-parser": "~1.3.2",
    "excel-export": "^0.4.1",
    "express": "~4.10.1",
    "express-session": "~1.9.1",
    "forever": "~0.11.0",
    "glob": "~4.0.5",
    "grunt": "0.4.5",
    "grunt-cli": "~0.1.13",
    "helmet": "~0.5.0",
    "json2xls": "0.0.5",
    "lodash": "~2.4.1",
    "method-override": "~2.3.0",
    "mocha": "~1.20.0",
    "moment": "^2.10.6",
    "mongoose": "^3.8.8",
    "morgan": "~1.4.1",
    "needle": "^0.11.0",
    "nodemailer": "~1.3.0",
    "nodemailer-sendgrid-transport": "^0.2.0",
    "passport": "~0.2.0",
    "passport-facebook": "~1.0.2",
    "passport-github": "~0.1.5",
    "passport-google-oauth": "~0.1.5",
    "passport-linkedin": "~0.1.3",
    "passport-local": "~1.0.0",
    "passport-twitter": "~1.0.2",
    "request": "^2.60.0",
    "stripe": "^3.6.0",
    "swig": "~1.4.1",
    "validator": "^3.41.2"
  },
  "devDependencies": {
    "eslint": "^2.2.0",
    "eslint-config-defaults": "^9.0.0",
    "grunt-concurrent": "~1.0.0",
    "grunt-contrib-csslint": "^0.3.1",
    "grunt-contrib-cssmin": "~0.10.0",
    "grunt-contrib-jshint": "~0.10.0",
    "grunt-contrib-uglify": "~0.6.0",
    "grunt-contrib-watch": "~0.6.1",
    "grunt-env": "~0.4.1",
    "grunt-karma": "~0.9.0",
    "grunt-mocha-test": "~0.12.1",
    "grunt-ng-annotate": "~0.4.0",
    "grunt-node-inspector": ">=0.1.3",
    "grunt-nodemon": "~0.4.1",
    "karma": "~0.12.0",
    "karma-chrome-launcher": "~0.1.2",
    "karma-coverage": "~0.2.0",
    "karma-firefox-launcher": "~0.1.3",
    "karma-jasmine": "~0.2.1",
    "karma-phantomjs-launcher": "~0.1.2",
    "karma-verbose-reporter": "0.0.3",
    "load-grunt-tasks": "~1.0.0",
    "should": "~4.1.0",
    "supertest": "~0.14.0"
  }
}

Upvotes: 3

Views: 1321

Answers (1)

Jay M
Jay M

Reputation: 269

Turns out I updated my Node version unknowingly when I switched to using Yarn instead of NPM for handling modules. I had to install node v6.1.3.

Upvotes: 3

Related Questions