-
-
Notifications
You must be signed in to change notification settings - Fork 206
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
Race condition causing errors chmod'ing DTS files with shebangs #1001
Comments
I've traced this to the use of https://github.com/egoist/rollup-plugin-hashbang in tsup's invocation of rollup to build dts files. Removing it from that task's rollup configuration seems to resolve this issue with no apparent side-effects. I will open a PR for further discussion of this possible solution. |
This was referenced Sep 18, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm seeing build errors related to .ts files that contain
#!/usr/bin/env node
, which tsup tries to chmod +x in order to ensure they are executable:If I re-run the build without deleting the dist directory first, the error does not re-occur. If I remove the
scripts/extract.ts
entry module from my project, the same error occurs with a different script:I've tried and failed to reproduce this in a toy project, where I guess the generation of .d.(m)ts files runs much more quickly, and therefore all of those files are generated before tsup tries to chmod those with shebangs at the top.
Unless I'm mistaken, the .d.(m)ts files for shebang scripts don't actually need to be chmod +x; only the actual .(m)js files need to be made executable. Could this be fixed by excluding the type definition files from the shebang plug-in?
Upvote & Fund
The text was updated successfully, but these errors were encountered: