-
-
Notifications
You must be signed in to change notification settings - Fork 139
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
Hangs indefinitely on esbuild error #532
Comments
For me, going back to 0.16.17 of esbuild avoids the hang. 0.17.0, the version immediately afterwards, triggers the hang. Here are the release notes for 0.17.0, in case anything sticks out: |
It's really weird because it "sometimes" fails depending on the type of file1.ts
file2.ts
This seems to hang (sometimes). I've had it where it was fully working another time. However, if I do `import { temp2 } from './file1'; It seems to error differently? Which is quite strange because looking at where the code in the plugin breaks: It breaks after Which is calling the bundleMapper from here: https://github.com/floydspace/serverless-esbuild/blob/master/src/bundle.ts#L137-L139 And it fails here in my case: https://github.com/floydspace/serverless-esbuild/blob/master/src/bundle.ts#L119 Now, here's what's weird to me. I'm so confused because if I put a However, if I throw before the execution then it's fine. I've tried running It has come to my attention that serverless framework v4 is actually in GA and uses small update
something to do with esbuild (I know, I know) ... I'm going to check the values from both errors and see the difference. I'm going to see if I can boil it down to just using esbuild standalone. I think we'd probably want to find a way to kill the process. I mean I put a (process.exit(1)) to force kill it in these instances but I'm not sure that's ideal? maybe it is, regardless |
Describe the bug
It seems that if this plugin encounters any esbuild error, it will hang. This is particularly bad in a CI env where the stdout may not be flushed and the process is waiting for timeout and consuming billable build minutes.
To Reproduce
Introduce some issue which causes esbuild to fail.
When I run the deploy locally, I get the stdout flushed and can see what the issue is. But the process still hangs.
Expected behavior
I would expect this log to be flushed and the process to exit with non zero code.
Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: