Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnhandledPromiseRejectionWarning when using ProfilingPlugin on node 6 #7654

Closed
skratchdot opened this issue Jul 4, 2018 · 3 comments · Fixed by #7655
Closed

UnhandledPromiseRejectionWarning when using ProfilingPlugin on node 6 #7654

skratchdot opened this issue Jul 4, 2018 · 3 comments · Fixed by #7655

Comments

@skratchdot
Copy link
Contributor

Bug report

What is the current behavior?
On node 6, run the following:

webpack --plugin webpack/lib/debug/ProfilingPlugin

The following warning is logged to the console:

UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: trace.destroy is not a function

On node 8, things work flawlessly (and the events.json is 80mb compared to 20mb).

Potentially need some additional logic here:
https://github.com/webpack/webpack/blob/master/lib/debug/ProfilingPlugin.js#L140

Or maybe just disable tracing for node 6 (or log a helpful warning message)?

I'm logging this due to: https://twitter.com/samccone/status/1014510041532022786

If the current behavior is a bug, please provide the steps to reproduce.
On node 6, run the following:

webpack --plugin webpack/lib/debug/ProfilingPlugin

What is the expected behavior?
Webpack build should complete with a full events.json, and no unhandled exceptions.

Other relevant information:
webpack version: 4.12.2
Node.js version: 6.14.1
Operating System: MacOS High Sierra 10.13.5
Additional tools:

@skratchdot
Copy link
Contributor Author

Node 6 end-of-life is April '19, so not sure it's even worth "fixing" this: https://github.com/nodejs/Release#release-schedule

I'll do some reading about chrome-trace-event and node 6 tracing, and see if there's anything I can figure out.

@skratchdot
Copy link
Contributor Author

This is just a node streams thing. destroy was added in v8: https://nodejs.org/api/stream.html#stream_writable_destroy_error

@sokra
Copy link
Member

sokra commented Jul 4, 2018

cc @samccone

skratchdot added a commit to skratchdot/webpack that referenced this issue Jul 4, 2018
skratchdot added a commit to skratchdot/webpack that referenced this issue Jul 4, 2018
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 a pull request may close this issue.

2 participants