运行node js编写的app.js文件时,错误来自passport-local-mongoose(一个节点模块)

时间:2018-10-14 19:00:58

标签: javascript node.js mongodb npm mongoose

var mongoose = require('mongoose');
var passportLocalMongoose = require('passport-local-mongoose');

var userIdSchema = new mongoose.Schema({
    username: String,
    name: String,
    password: String,
    phonenumber: Number
});

userIdSchema.plugin(passportLocalMongoose);

module.exports = mongoose.model("NewUser", userIdSchema);']

Error Image

1 个答案:

答案 0 :(得分:0)

您在代码中有多余的“(”

.then(({ user })...