簡體   English   中英

Mongoose / MongoDB錯誤:無法確定服務器的狀態

[英]Mongoose/MongoDB Error: Cannot determine state of server

突然間,我在本地運行我的應用程序時開始出現此錯誤。 據我所知,上次工作和現在之間沒有任何變化。 它似乎是數據庫層上的錯誤,因為它發生在應用程序嘗試執行某些與數據庫相關的任務時。

我試過升級節點,npm,mongoose,mongodb,我仍然得到同樣的錯誤。

我可以提供很多信息,但我不知道哪些是最相關的,所以讓我知道還有什么需要幫助解決這個問題。

我還附上了我目前的package.json

瀏覽器中顯示錯誤

{

  "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"
  }
}

事實證明,當我切換到使用Yarn而不是NPM來處理模塊時,我在不知不覺中更新了我的Node版本。 我不得不安裝節點v6.1.3。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM