Automattic / Automattic/node-canvas
Lib and dependencies errors
- Dominant language
- JavaScript
- Stars
- 10.7k
- Forks
- 1.2k
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 1
Description
## Issue
- [x] If this is an issue with installation, I have read the [troubleshooting guide](https://github.com/Automattic/node-canvas/issues/1511).
So, I'm using [ChartJsNodeCanvas](https://github.com/SeanSobey/ChartjsNodeCanvas) on a project, locally it works fine, we are using Amazon code deploy with AWS ECS fargate, when the first error started we do many test and read all issues possible, but after every test of adding an lib *.so on ./node_modules/canvas/build/Release/ throws a new lib is missing. We believe there's an basic error that occurring and we don't know.
Also, we tried to download all lib *.so that canvas needs and moved then all to ./node_modules/canvas/build/Release/ but not work too.
The first error was:
```
Error: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /usr/app/node_modules/canvas/build/Releases/libpixman-1.so.0
```
After running the following commands on build and moving some files it resolve this error.
```
- sudo apt-get update
- sudo apt-get -y install manpages-dev libc6 build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev libpangocairo-1.0-0 libuuid1
- npm install --build-from-source
- cp -R /lib/x86_64-linux-gnu/* ./node_modules/canvas/build/Release/
```
But started to throw another error:
```
Error: Error relocating /usr/app/node_modules/canvas/build/Release/libuuid.so.1: __fprintf_chk: symbol not found
```
i just import from chart.js and chartjs-node-canvas.
## Steps to Reproduce
```
import { ChartConfiguration } from 'chart.js';
import { ChartCallback } from 'chartjs-node-canvas';
const { ChartJSNodeCanvas } = require('chartjs-node-canvas');
const altimetryChartConfig: ChartConfiguration = {
type: 'line',
data:
...
},
};
const chartCallback: ChartCallback = ChartJS => {
ChartJS.defaults.elements.line.tension = 0.3;
ChartJS.defaults.elements.point.radius = 0;
};
const altimetryChart = new ChartJSNodeCanvas({
type: 'jpeg',
height: 200,
width: 1800,
chartCallback,
});
//
```
## Your Environment
* Version of node-canvas : 2.10.2
* Environment: the code deploy don't informs witch version of node and Ubuntu he has, but we do some test and searches and looks like node has version 16 and Ubuntu 20.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.