-
-
Notifications
You must be signed in to change notification settings - Fork 144
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
Printing error from esbuild can fail #492
Labels
Comments
PR welcome but I'd need verification that the fix is effective |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
As per the Contribution Guide, I've hid comments that aren't productive towards landing a fix. @narthur Would you be open to contributing a PR? |
@privatenumber Sure, I can take a whack at it. |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
We no longer do the following so this should no logner happen: const [firstError] = error.errors;
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Acknowledgements
Minimal reproduction URL
na
Version
4.7.1
Node.js version
20.11.1
Package manager
npm
Operating system
macOS
Problem & Expected behavior
I have my project set up with tsx (macOS), which all works fine. However I wanted to test something in linux, so I created a VM with a bind mount to my project. This caused the node_modules folder that was installed on macOS, to also be used on linux. This is not supported by esbuild: https://github.com/evanw/esbuild/blob/c809af050a74f022d9cf61c66e13365434542420/lib/npm/node-platform.ts#L195
Which is my mistake. However this took me a bit to figure out, because tsx is accidentally hiding this error:
I think this is the code in question:
tsx/src/utils/transform/index.ts
Line 28 in b39e9b1
Manually adding a
console.log(error)
to the minified code in node_modules/tsx, allowed me to figure out what was going on:This error value does not have an "errors" property.
I would suggest changing the code to look like (untested):
Contributions
The text was updated successfully, but these errors were encountered: