agutoli / serverless-layers

Serverless.js plugin implementing AWS Lambda Layers, reducing lambda size, warm-up, and deployment time.
MIT License
229 stars 54 forks source link

Fixes bug that happens when the the size of a dependency is too large #43

Closed mt-sveshkini closed 4 years ago

mt-sveshkini commented 4 years ago

Hi! Thank you for the awesome plugin. I was trying to use this plugin at my company, and came across an issue that happens when dependencies are too big (in this case, it was the aws-sdk due to a subdependency). Basically, the buffer size is too small. I looked into it and found a fix here, and implemented it in this package. It worked after I did this. Please let me know if you have any questions!


Error: spawnSync /bin/sh ENOBUFS
      at Object.spawnSync (internal/child_process.js:1041:20)
      at spawnSync (child_process.js:607:24)
      at execSync (child_process.js:652:15)
      at Dependencies._callee$ [...]```
agutoli commented 4 years ago

I appreciate your PR @mt-sveshkini ! thanks