You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the minimal example is bundling using the @rollup/plugin-json, @rollup/plugin-json, @rollup/plugin-commonjs, and a minimal example of a dodgy (my) plugin that just has a transform hook that throws an error (:() on the second call
I would expect to see the error thrown in the console alongside the "unfinished hook action(s)" message
Actual Behaviour
only the "unfinished hook action(s)" message appears in the console, which made debugging really, really fun
Thanks for the nice repro. I recently saw this myself but could not really find a good reproduction as it only occurred in an Ava test but not e.g. in Rollup CLI. I added a fix to #4409. Apparently, using top-level-await is one of the few ways to really do this without getting the error anyway as an "unhandledPromiseRejection".
In short, calling process.exit(1) in a process.on('exit', ...) handler is a bad idea as it can swallow other "cleanup" actions. Instead, I now set process.exitCode = 1, which has the same effect of ensuring we get an error on exit, but nothing is swallowed.
Rollup Version
2.67.2
Operating System (or Browser)
Manjaro Linux
Node Version (if applicable)
v17.4.0
Link To Reproduction
https://github.com/samualtnorman/rollup-minimal-issue-repro
Expected Behaviour
the minimal example is bundling using the
@rollup/plugin-json
,@rollup/plugin-json
,@rollup/plugin-commonjs
, and a minimal example of a dodgy (my) plugin that just has atransform
hook that throws an error (:(
) on the second callI would expect to see the error thrown in the console alongside the "unfinished hook action(s)" message
Actual Behaviour
only the "unfinished hook action(s)" message appears in the console, which made debugging really, really fun
The text was updated successfully, but these errors were encountered: