启动后报错,怎么解决。。
发布于 1年前 作者 luqisc 397 次浏览
TypeError: Invalid select() argument. Must be a string or object.

    at Query.select (E:\nodeclub\node_modules\mongoose\lib\query.js:1302:11)

    at Function.find (E:\nodeclub\node_modules\mongoose\lib\model.js:815:9)

    at Object.exports.getAllTags (E:\nodeclub\proxy\tag.js:28:7)

    at exports.index (E:\nodeclub\controllers\site.js:58:7)

    at callbacks (E:\nodeclub\node_modules\express\lib\router\index.js:272:11)

    at param (E:\nodeclub\node_modules\express\lib\router\index.js:246:11)

    at pass (E:\nodeclub\node_modules\express\lib\router\index.js:253:5)

    at Router._dispatch (E:\nodeclub\node_modules\express\lib\router\index.js:280:5)

    at Object.Router.middleware [as handle] (E:\nodeclub\node_modules\express\lib\router\index.js:45:10)
    at next (E:\nodeclub\node_modules\express\node_modules\connect\lib\http.js:204:15)
2 回复

楼主应该说下是论坛的代码… 看报错位置是数据库没设置好, 描述一下步骤?

搞定,mongoose版本问题,换了2.X旧版就OK了。

回到顶部