#4475·esbuild

Reconsidering the removal the postinstall script

Author: alcuadradoCreated May 26, 2026Updated Aug 21, 2026
Labelsbreaking

Hi,

I'm creating this issue because I think this other one ( https://github.com/evanw/esbuild/issues/4085 ) may need to be reconsidered.

While I understand the points explained in the previous one, two things have changed:

  • pnpm now doesn't install packages with postinall scripts by default, resulting on a failure, and not a warning.
  • npm will incrementally move in the same direction: https://github.com/npm/rfcs/pull/868

I think this is specially important for people using esbuild as a transitive dependency, e.g. through tsx. As people installing it directly should have an easier time providing the required flag/settings.

Maybe a solution that would make the change simpler is splitting the package into two: esbuild (the cli), and esbuild-lib (the library).