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
I spent 5 hours yesterday debugging the "canvas.node is not a valid win 32 application" bug.
This was occurring because I was deploying to a Windows server, but using a pipeline running on Ubuntu.
Then, I had to deal with "Error: The module ...canvas.node'was compiled against a different Node.js version usingNODE_MODULE_VERSION 93. This version of Node.js requiresNODE_MODULE_VERSION 83. Please try re-compiling..."
I managed to fix this by forcing my pipeline to run Node 14 instead of 16.
I've got an Azure DevOps pipeline that deploys a NestJS (Node) app to a Windows server.
Part of this app is an API which has an endpoint that renders a chart into a PDF.
This works fine locally.
Once I finished fixing this bug and getting my app to deploy, this is what the PDF looks like:
This is what the exact same code looks like running locally:
On my machine, I run Node 12.22.1
For the pipeline, I am using Node 12.22.1
My package.json has chart.js version 3.9.1 and chartjs-node-canvas version 4.1.6
My actual server is running Node 12.21.0
I've tried messing around with versions of node, chartjs, and chartjs-node-canvas, but it is very, very easy to trigger the error "The module was compiled against a different node version...". My best idea so far was to make sure my local machine, pipeline, and deployment server were all running Node 12. I then downgraded both dependencies, but continued receiving the different node version error mentioned above.
Does anyone familiar with this package have any idea why this is happening? It's so weird. This is delaying a very important release.
Also can I post this anywhere else? Not sure if the other canvas related communities can help. I truly am desperate here.
The text was updated successfully, but these errors were encountered:
chxpel
changed the title
Visual Artifact/Glitch in Chart
Visual Artifact/Glitch in Chart rendered on Node server
Dec 19, 2022
I spent 5 hours yesterday debugging the "canvas.node is not a valid win 32 application" bug.
This was occurring because I was deploying to a Windows server, but using a pipeline running on Ubuntu.
Then, I had to deal with "Error: The module ...canvas.node'was compiled against a different Node.js version usingNODE_MODULE_VERSION 93. This version of Node.js requiresNODE_MODULE_VERSION 83. Please try re-compiling..."
I managed to fix this by forcing my pipeline to run Node 14 instead of 16.
I've got an Azure DevOps pipeline that deploys a NestJS (Node) app to a Windows server.
Part of this app is an API which has an endpoint that renders a chart into a PDF.
This works fine locally.
Once I finished fixing this bug and getting my app to deploy, this is what the PDF looks like:
This is what the exact same code looks like running locally:
On my machine, I run Node 12.22.1
For the pipeline, I am using Node 12.22.1
My package.json has chart.js version 3.9.1 and chartjs-node-canvas version 4.1.6
My actual server is running Node 12.21.0
I've tried messing around with versions of node, chartjs, and chartjs-node-canvas, but it is very, very easy to trigger the error "The module was compiled against a different node version...". My best idea so far was to make sure my local machine, pipeline, and deployment server were all running Node 12. I then downgraded both dependencies, but continued receiving the different node version error mentioned above.
Does anyone familiar with this package have any idea why this is happening? It's so weird. This is delaying a very important release.
Also can I post this anywhere else? Not sure if the other canvas related communities can help. I truly am desperate here.
The text was updated successfully, but these errors were encountered: