I'm currently using chartjs-node
to generate some charts. My node.js code runs perfectly on my local (windows) machine, but I suspect that's because I have windows-build-tools
installed, which includes the cairo
package.
When I push to my remote (linux) server and try to compile, I get the following error:
No package 'cairo' found
However, my package dependency list is as follows:
"canvas-prebuilt": "^1.6.5-prerelease.1",
"chart.js": "2.6.0",
"chartjs-node": "^1.6.1"
Based on my understanding from the documentation, using canvas-prebuilt
instead of canvas
should circumvent the need for any package pre-installation on my server. Obviously, I could just preinstall the necessary packages (as described in this SO answer) - but I'm wondering if there's any way to set up my package dependency list to avoid that route.
Thanks for your help!