-
Notifications
You must be signed in to change notification settings - Fork 1.2k
node-pre-gyp still needed? #1891
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
Comments
I was looking at this earlier for another package as well, it's crazy how big node-pre-gyp is when all it does for the end user is to download some binaries 😅 It also tries to require in Would love some small package just for fetching the binaries! Maybe we should inquire about this upstream? |
Here is an alternative package without any postinstall scripts and dependencies: https://github.com/Brooooooklyn/canvas |
v3.0.0-rc switches to prebuild-install, which drops the prebuild-related dependency size from 2 MB to 948 KB. https://npmgraph.js.org/?q=canvas@3.0.0-rc2#select=exact%3Aprebuild-install%407.1.2 Right now the binaries are too large to include in the NPM tarball, but with quite a bit of work we might be able to get them small enough. (librsvg might make that difficult though.) |
The scope of SVG support is gigantic and impossible to do correctly, and I think people would be less sad if they actually avoided rendering SVGs at all. If we must have librsvg, we can support linking to librsvg in Yesterday I started work on redoing the entire font stack to fix long-standing font issues, which will reduce dependencies even more. With all that, I think we would be able to then ship in the NPM tarball. I would like us to move to a static build to simplify CI/prebuild hell. Meson subprojects make doing that really easy, but sadly most of our dependencies haven't migrated to it yet. Maybe we'll have to add a |
if binaries are precompiled and downloaded, do we still need node-pre-gyp?
It seems to take up much of the total dependency: https://npmgraph.js.org/?q=canvas@2.8.0
maybe it can be optional somehow to install it?
The text was updated successfully, but these errors were encountered: