Serverless 1.21.0 breaks Sharp library

My version of serverless upgraded from 1.20.2 to 1.21.0 and when I package a lambda function for AWS using “serverless deploy --noDeploy” it AWS reports “ELF file’s phentsize not the expected size” and errors out. I downgraded serverless back to 1.20.2 and it works again. Sharp compiles some native libraries using node-gyp and something seems to be wrong with how they are packaged.

Probably best to raise a GH issue for this kind of bug.

@pkeeley There was a regression in 1.21.0 in packaging binary files. The full issue is here.

A patch is in progress, but I’d recommend downgrading to 1.20.2 for the time being.