We need an feature to run npm rebuild/install inside of a docker lambci container, during the includeModules step.
Only so will the right native binaries be built.
Hi @heri16 , this is already available. See https://github.com/serverless-heaven/serverless-webpack/issues/342#issuecomment-383248835 for an example where the gprc library is rebuilt for the correct node version and target operating system.
The way to go here is to add a scripts section to the packager options:
# serverless.yml
custom:
webpack:
...
packagerOptions:
scripts:
- npm rebuild grpc --target=8.1.0 --target_arch=x64 --target_platform=linux --target_libc=glibc
@heri16 Did you try the script feature?
Hi @heri16, closing this issue since there is a documented workaround. Please let us know if the issue persists and we can re-open it 馃槈
The script doesn't seem to work for node-canvas.