J
J
Joseph Kopeikin2018-07-03 17:11:42
MongoDB
Joseph Kopeikin, 2018-07-03 17:11:42

How to fix Custom inspection function on Objects via .inspect() is deprecated?

mymodel.findById(req.params.id).then(data => {
    console.log(data)
});

This code gives [DEP0079] DeprecationWarning: Custom inspection function on Objects via .inspect() is deprecated nodejs
10.5
mongoose 5.2
. What is the magic?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Iosif Kopeikin, 2018-07-03
@iosiff

It wasn't about the bobbin. I forgot to write the required fields in the model. And warning is not scary.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question