sst / ion

❍ — a new engine for SST
https://ion.sst.dev
MIT License
1.09k stars 126 forks source link

fix: Sharp bundling install issue #548

Closed cmanou closed 1 week ago

cmanou commented 2 weeks ago

The platform filter was in correct for npm thus it wasn't installing the optional dependencies for the new @img/sharp_* prebuilts but was actually installing the current platform specific ones (eg Darwin if running on Mac OS). Swapping to the os and libc flags fixes the issue as recommended in https://sharp.pixelplumbing.com/install#npm-v10

Fixes https://github.com/sst/ion/issues/197

cmanou commented 2 weeks ago

@fwang looks like you might have the context from the original changes in this area

cmanou commented 1 week ago

@thdxr Since I was on the same arch as the deployment target lambda I didn't notice that the arch flag also changed to cpu. So that needs updating looks like there is already a pr that has that fix and slightly more support for other packages https://github.com/sst/ion/pull/549/files might be worth merging otherwise ill make a pr that just fixes the flag for sharp