Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tracing a deprecation warning

I am receiving this warning in my program, I have recently updated to Node 10 and I'm trying to figure out the source of the deprecation warning:

[DEP0079] DeprecationWarning: Custom inspection function on Objects via .inspect() is deprecated

How can I trace where this error originates?

PS. I've tried --trace-warnings and --trace-deprecation on the CLI, getting no luck

like image 418
mateos Avatar asked May 20 '18 06:05

mateos


People also ask

What does it mean when a method is deprecated?

This does not relate to the question. Yes the error message is similar, a deprecation warning - this only means that the method you use is going to be removed in the future and is not advised to use. It can happen in any javascript code. You posted mongoose specific code.

What is deprecationwarning in web development?

In general developers are developing libraries and in developing sometime add o change thing and sometime remove theme. removing is danger because user may used that and if a developer want to remove a thing first have to notify others to don't use this feature or things and after this he can remove. and DeprecationWarning is this notification.

Why do I get so many deprecation warnings when upgrading Webpack?

Naturally, e.g. upgrading webpack from v 2.x to 4.x, a lot of the API changed and a lot of plugins needed (or still need) to change. As a result of that, I found myself going through heaps of deprecation warnings in the process.

Is log_multivariate_normal_density deprecated?

D:\programs\anaconda2\lib\site-packages\sklearn\utils\deprecation.py:70: DeprecationWarning: Function log_multivariate_normal_density is deprecated; The function log_multivariate_normal_density is deprecated in 0.18 and will be removed in 0.20. warnings.warn(msg, category=DeprecationWarning)


2 Answers

OP Here

Since --trace-warnings and --trace-deprecation didn't show a stacktrace, I found another way that did:

process.on('warning', (warning) => {
    console.log(warning.stack);
});
like image 164
mateos Avatar answered Sep 30 '22 11:09

mateos


This has been a problem before, And my problem has been solved ,The reason for my problem was the extension (color highlights), Since it was downloaded, the server has stopped working After deleting this damn addition, the problem was solved. enter image description here

like image 22
AliAbuhumra Avatar answered Sep 30 '22 12:09

AliAbuhumra