MongoError:拓扑被破坏了sailsjs [英] MongoError: topology was destroyed sailsjs
问题描述
当我尝试创建此错误时显示:
When I try to create this error shows up:
错误(E_UNKNOWN)::遇到意外错误
MongoError :拓扑在Server.insert中被销毁
(/Users/oscargallon/Documents/developer/sails/reyesmagoswebpae/node_modules/sails-mongo/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js: 797:49)
Error (E_UNKNOWN) :: Encountered an unexpected error MongoError: topology was destroyed at Server.insert (/Users/oscargallon/Documents/developer/sails/reyesmagoswebpae/node_modules/sails-mongo/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:797:49)
这是我的模特
module.exports = {
attributes: {
name: {
type: 'string',
required: true
},
email: {
type: 'String',
required: true
},
description: {
type: 'string',
required: true
},
phonenumber: {
type: 'string',
required: true
},
mobile: {
type: 'string',
required: true
}
}
};
推荐答案
我今天也遇到了同样的问题 - 我改变了sails-mongo版本从sails-mongo:^ 0.10.7到sails-mongo:^ 0.10.6in package.json in sails并运行$ sudo npm install然后sails lift它工作得很好我认为npm
I also encountered this same problem today - i changed the sails-mongo version from "sails-mongo": "^0.10.7" to "sails-mongo": "^0.10.6" in package.json in sails and ran $ sudo npm install then sails lift it worked fine i think there is some error in npm
这篇关于MongoError:拓扑被破坏了sailsjs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!