I cant import mongoose on the frontend but it worked on the backend.
I have a separate directory for the backend. I have some code to add a couple users to my database.
Mongoose's browser library doesn't support mongoose.connect(). It only supports schemas and document validation, it can't actually connect to MongoDB or save documents currently.
mongoose.connect()