Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I recently updated my node to 7.2.1 and noticed that there is a warning coming:

(node:4346) DeprecationWarning: Calling an asynchronous function without callback is deprecated.

What is this 4346 for? I only have 2000 lines in the js file, so it can't be a line-number. Where can I find the code?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
346 views
Welcome To Ask or Share your Answers For Others

1 Answer

You can use either the --trace-deprecation or --throw-deprecation options.

For example:

node --trace-deprecation app.js

or:

node --throw-deprecation app.js

The first option will log a stack trace and the second will throw an error (which, if not caught, will also log a stack trace).

Also, 4346 is most likely the process ID.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...