Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ChartjsNodeCanvas depending on node canvas #19

Closed
AleksandarGT opened this issue Jul 31, 2023 · 2 comments
Closed

ChartjsNodeCanvas depending on node canvas #19

AleksandarGT opened this issue Jul 31, 2023 · 2 comments
Assignees

Comments

@AleksandarGT
Copy link

Hello I have been trying to use chartjs within a lambda function, therefore I used chartjs node canvas to create graphs in a node environment. I also use Amplify to manage my lambdas.

Lambda throws error
/var/task/node_modules/canvas/build/Release/canvas.node: invalid ELF header on execution.

I tried using your lambda layer and it successed with importing canvas to my code and running it, however the moment i import chartjs node canvas the lambda throws invalid ELF header error.
Is it possible that since the chartjs library depends on node-canvas, npm installs it and it overrides your lambda layer which has the correct binaries?

@charoitel charoitel self-assigned this Aug 18, 2023
@charoitel
Copy link
Owner

Currently the only way is to remove the duplicated canvas which may need some efforts. Thanks for suggesting to add chartjs.

Would do some more round of works here and target to release in next release. Thank you~

@charoitel charoitel mentioned this issue Aug 19, 2023
@charoitel
Copy link
Owner

A new maintenance release is available through AWS Serverless Application Repository. Please deploy and try. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants