-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Logger output is overwritten by failure message #5165
Comments
Bump, still seeing this in the nightly builds. This is currently making it impossible to debug my plugin. The docs for developing are slim enough, I need to see output to continue 🤦 |
To work around this it's sufficient to disrupt parcel build |& cat |
Thank you for the tip! |
I think this is caused by
For watch mode, it should probably be cleared, but I guess not for one-shot builds. |
I've stopped seeing the issue as of |
I see this issue just running |
Not working too well for me: $ parcel |& cat
Server running at http://localhost:1234
Building...
Installing buffer...
[Error: ENOENT: no such file or directory, open 'rjsf/node_modules/deepcopy/src/buffer.mjs'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: 'rjsf/node_modules/deepcopy/src/buffer.mjs'
}
🚨 Build failed.
unknown: Could not find entry: /home/user/rjsf
Parcel is shutting down...
Parcel is shutting down...
user@os:~/rjsf$ ^C
user@os:~/rjsf$ cat package.json
{} And I can't find resetWindow to comment it out:
|
Adding |
Ctrl+C does not stop the error from being removed in my case. This is parcel v2.3.2. |
Another trick is to set the environment variable I tried reproducing the issue with I had a little transformer:
Which should just return the assets unchanged but it just spews this error:
That makes me think something is broken with |
🐛 bug report
While writing a plugin, I used the Transformer's
logger
to log some debug info (part of diagnosing another issue). Unfortunately, if the transformation step fails for another reason (e.g. "@parcel/packager-js: Asset has no content") the debug info I sent is overwritten and can't be reviewed.In other words: while the Transformer is transforming, I can see my debug output, but as soon as the whole process fails, the debug output is erased on the terminal and overwritten with a "failure" message (in this case, an UnhandledPromiseRejectionWarning).
🤔 Expected Behavior
Logger output should be preserved, even if there is a catastrophic failure during the transformation step.
😯 Current Behavior
During the build process, if I
ctrl-C
before the final error, I can see the error messages in the logs:(note "DEBUG OUTPUT HERE")
But if I allow it to continue to the end, the "DEBUG OUTPUT HERE" disappears:
💁 Possible Solution
Since I can't use
console.log
and related tools for debug output, it's important that the logger output not be erased in the terminal. Actually, I wonder if part of the problem is that the logger output is being overwritten by STDOUT fromconsole.log
due to an error not "inside" the parcel logger ecosystem?🔦 Context
I just need a way to get some debug output into the console while developing a plugin.
💻 Code Sample
Creating a postProcess that returns undefined can replicate this issue:
🌍 Your Environment
The text was updated successfully, but these errors were encountered: