-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Hi,
I'm also struggling with updating serverless-webpack (for this: https://github.com/Jaikant/lambda-image-sharp) so I came across your issue and this repo. However, unfortunately I haven't been able to get it working even with these additional information.
Are there changes necessary? I guess I need to add the sharp tarball, which I did (had to use older version 0.18.2). I also uncommented the ExtractTarballPlugin and changed its target directory to .webpack/dependencies/ (I have to use yarn because npm doesn't want to merge two node_modules folder).
I also added a includeModules: in the custom webpack config. Nothing helped, I still get this error when the lambda function starts running:
module initialization error: Error
at Error (native)
at Object.Module._extensions..node (module.js:597:18)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/var/task/node_modules/sharp/lib/constructor.js:9:15)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
The content of the uploaded zip seems ok but on the other hand it seems, something is missing to make sharp run. Any hints are appreciated.
Silvio
My fork: https://github.com/einSelbst/serverless-webpack-sharp