Skip to content
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

Log more information when a postinstall script fails #25396

Closed
redabacha opened this issue Sep 3, 2024 · 2 comments · Fixed by #26075
Closed

Log more information when a postinstall script fails #25396

redabacha opened this issue Sep 3, 2024 · 2 comments · Fixed by #26075
Assignees
Labels
bug Something isn't working correctly cli related to cli/ dir

Comments

@redabacha
Copy link

currently it seems deno will only report that a postinstall script has failed and not any reason why as such. other package managers like yarn will dump the stdout/stderr of the postinstall script process to a temporary file on disk which is useful for debugging and it would be great if deno did a similar thing, even if it's just logging directly to the terminal.

@redabacha
Copy link
Author

redabacha commented Sep 3, 2024

actually with that said, sometimes i see error output but it doesn't always show when running locally. maybe it's related to the loading indicator?

these are two attempts i had running deno install with the esbuild postinstall script failing:

❯ DENO_FUTURE=1 deno install --no-lock --allow-scripts
Warning rimraf@3.0.2 is deprecated: Rimraf versions prior to v4 are no longer supported
Warning glob@7.2.3 is deprecated: Glob versions prior to v9 are no longer supported
Warning inflight@1.0.6 is deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
Warning @humanwhocodes/config-array@0.11.14 is deprecated: Use @eslint/config-array instead
Warning @humanwhocodes/object-schema@2.0.3 is deprecated: Use @eslint/object-schema instead
Download ⣯ [00:22] 1803/1804
error: script 'postinstall' in 'esbuild@0.21.5' failed with exit code 1

here it doesn't show the error message.

and the next time i run it the error message shows:

❯ DENO_FUTURE=1 deno install --no-lock --allow-scripts
Error launching 'deno': Argument list too long (os error 7)
error: script 'postinstall' in 'esbuild@0.21.5' failed with exit code 1

@lucacasonato lucacasonato added bug Something isn't working correctly cli related to cli/ dir labels Sep 4, 2024
@nathanwhit
Copy link
Member

maybe it's related to the loading indicator?

Yeah I think this is correct, it looks like the progress bar is writing over the postinstall script output. I'll look into this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly cli related to cli/ dir
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants