Skip to content

mongoose.Schema is not a constructor#10

Open
neerajdangol wants to merge 3 commits intothebergamo:masterfrom
neerajdangol:master
Open

mongoose.Schema is not a constructor#10
neerajdangol wants to merge 3 commits intothebergamo:masterfrom
neerajdangol:master

Conversation

@neerajdangol
Copy link

Error:
App Error VError: /Applications/MAMP/htdocs/start-hapiness/src/shared/user/model.js is not a valid model: mongoose.Schema is not a constructor
Fix:
Replaced
const mongoose = require('k7-mongoose').mongoose
with
const mongoose = require('k7-mongoose').mongoose()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant