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

Consider using prebuildify #3709

Closed
charsleysa opened this issue Jun 26, 2023 · 4 comments
Closed

Consider using prebuildify #3709

charsleysa opened this issue Jun 26, 2023 · 4 comments
Labels

Comments

@charsleysa
Copy link

Please consider switching to using prebuildify and shipping the prebuilt binaries with the npm package so that it can be used in environments that don't/can't execute postinstall scripts.

This would open up support for environments like deno, and it's also the recommended configuration given by prebuild-install/prebuildify (see https://github.com/prebuild/prebuild-install#note).

@lovell
Copy link
Owner

lovell commented Jun 26, 2023

Hi, please see #2741 (comment) for why prebuildify is probably the wrong solution (I'm one of the prebuild maintainers).

I'm hoping cross-package-manager support for distributions in package.json, a possible outcome of npm/rfcs#519, will be a much better solution.

@charsleysa
Copy link
Author

Would you consider using prebuildify just for shipping the .node files while keeping the libvips files still separate?
If I understand correctly, this should allow sharp to work by using a globally installed libvips without needing to run any npm install scripts as the missing component is the .node file.

@lovell
Copy link
Owner

lovell commented Jun 27, 2023

A globally-installed libvips necessitates the compilation of sharp from source.

https://sharp.pixelplumbing.com/install#building-from-source

You mentioned Deno - see denoland/deno#16164 for proposed opt-in install script support, a sensible compromise until distributions becomes a thing.

@lovell
Copy link
Owner

lovell commented Jul 9, 2023

I hope this information helped. Please feel free to re-open with more details if further assistance is required.

@lovell lovell closed this as completed Jul 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants