-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Hi! 👋🏻
We're looking to integrate esbuild with the Netlify CLI and some users are reporting permission-related errors when installing the application, which trace back to #369.
I understand that this is a result of the UID/GID switching that npm does when running scripts, which is problematic when the package is installed as root.
Rather than manually fetching the appropriate binary as part of the postinstall script, could the esbuild package list the various platform-specific packages as optionalDependencies, and shift to npm itself the responsibility of figuring out which packages to installed based on the cpu and os properties? We're doing this for one of our packages that also includes a Go binary and it works well.
I'm happy to contribute with a pull request, but I wanted to check whether this is something you'd be interested in, or even if it's something you've already considered and discarded for a particular reason.
Thanks in advance!