Remix.run Logo
voidUpdate 2 hours ago

One thing I've never understood is why NPM allows packages to run code immediately after they are installed. What's the use case for that? A package should just be some code you can call on at runtime

tom1337 2 hours ago | parent | next [-]

Some packages need to build native dependencies. sharp for example needs to build libvips on the system [0] to work

0: https://github.com/lovell/sharp/blob/main/install/build.js

vinnymac an hour ago | parent [-]

I’ve always felt this automation shouldn’t exist at all, but should rather be selectively controlled via a hook. The hooks yarn offers out of the box for example can be used to run any code you need to after install. Putting the project owner in control instead of the dependency.

mark_l_watson an hour ago | parent | prev [-]

I turn off running scripts on installation. So far, no inconveniences.