You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I have been trying to use ChartJsNodeCanvas with AWS Lambda + AWS Amplify, but I keep having problems with node-canvas with the error 'var/task/node_modules/canvas/build/Release/canvas.node: invalid ELF header'.
So far what I have tried is to use an AWS Lambda Layer for node-canvas: Lambda layer
Now when I import canvas it doesn't throw error and successfully console logs it
Hello, I have been trying to use ChartJsNodeCanvas with AWS Lambda + AWS Amplify, but I keep having problems with node-canvas with the error 'var/task/node_modules/canvas/build/Release/canvas.node: invalid ELF header'.
So far what I have tried is to use an AWS Lambda Layer for node-canvas:
Lambda layer
Now when I import canvas it doesn't throw error and successfully console logs it
However the moment I import chartjs-node-canvas it throws invalid ELF header.
I am confused, because the lambda layer provides node canvas version @2.11.2 which should be compatible with chartjs node canvas.
I can provide more information if this wasn't enough.
The text was updated successfully, but these errors were encountered: