The official Node.js Snap as distributed via the Ubuntu Snap Store
does not provide support for native modules.
Sometimes, if the version of the core matches the version of the
underlying OS, then it will appear to work.
There are quite a few open issues relating to this in the
nodejs/snap repo.
This partially reverts commit 51e56f994ce1332f77daf625e23820a895de074d.
Ignoring plug'n'play, it looks like yarn and pnpm do get the
filesystem layout right for this scenario, which is good news.
It also looks like npm 10 will get it right too.
If you want to build sharp from source against a globally-installed
libvips then you will now need to add both node-addon-api and
node-gyp to the dependencies section of your package.json file.
The binding.gyp file is "hidden" inside the src directory to
prevent various build and package manager tooling from assuming
that everyone is going to build from source every time.
- Remove all custom download logic for prebuilt binaries
- Add scripts to populate package contents
- Specify minimum versions of common package managers
- Remove sharp.vendor runtime API as no-longer relevant
- Update installation docs and issue templates