This is another indicator that "lifecycle" scripts in NPM (or other packaging systems, except perhaps Debian or RPM) are an idea we need to learn to live without. At most, packages should be able to emit a message to the user asking them to invoke a one-liner if a setup action is truly necessary.

As a side benefit, eliminating package scripts will contribute toward reproducibility of Docker and VM images.

I realize this will be a controversial opinion.

Agreed, but that’ll be a marginal improvement at best.