3

I'm trying to use node-canvas to create animated gifs with an AWS Lambda function. But I'm struggling to even get off the ground with all the dependencies.

I've read the thread here, but it's mostly greek and I can't get it working.

I'd far prefer an out of the box (prebuilt) option and have found node-canvas-lambda-deps, but the docs are sparse (non-existent), so I'm not sure how to make use of it.

I've tried copying this example verbatim, but just get the error:

Error: function response: Module did not self-register.

Any tips to get node-canvas, or any way to create an animated gif, running in a Lambda?

nicholas
  • 14,184
  • 22
  • 82
  • 138

1 Answers1

3

The prebuilt binaries here do work, just had to dig into the issues to find this:

AWS is suggesting running node 4.3 for node endpoints, but this version of canvas will only work with 0.10. If nothing else, perhaps specifying the runtime in the readme.md file would be helpful. Thanks for putting this example together though. Super helpful!

nicholas
  • 14,184
  • 22
  • 82
  • 138