-
Notifications
You must be signed in to change notification settings - Fork 26
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
yarn bundle: internal error: unsupported file type #187
Comments
Thanks for the detail on this report, that's certainly an odd one. The last log line is from here https://github.com/ojkelly/yarn.build/blob/main/packages/plugins/plugin-bundle/src/commands/bundle/index.ts#L353 And all the work under that before the next log line uses the Is it possible that there's a corrupt file, or something that could be tripping that up? Are you able to put together a repository that reproduces this? I do agree with your comment on expected behaviour, I do want to catch these errors and provide more actionable information about what to do. |
No, it's likely not a corrupt file, because that would entail reading the file to see what's in it, which in turn would be a security vulnerability. Instead I believe files should either be of a known mime type, or have a file extension that's trusted by the calling code. I don't know how I got this fixed actually, but it cost me a few hours until it magically started working. |
@jkruse14 would you be able to upload an example repo where this occurs? |
I am seeing this as a result of having sockets in my repo (git-secret), during the initial copy into a temp dir. The bundleignore seems to be applied after that copy, so I am not sure how to work around this using the built-in tool. Temporarily removing the sockets makes the bundle complete. |
Describe the bug
With my repo, having linked another workspace (that is a package) into my workspace (that is the HTTP API service), running
yarn bundle
yields:To Reproduce
No idea, since I don't know what file it chokes on.
Expected behavior
Internal errors should never be thrown to the user and if they do, should include context to debug.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: