Error when using node-canvas in combination with gatsby-plugin-sharp #38525
Labels
status: triage needed
Issue or pull request that need to be triaged and assigned to a reviewer
type: bug
An issue or pull request relating to a bug in Gatsby
Preliminary Checks
Description
gatsby-plugin-sharp
from version 5 onwards seems to be incompatible with node-canvas.When running
gatsby develop
(or build for that matter) with the sharp.plugin enabled, the build will crash. Deactivatinggatsby-plugin-sharp
by removing it from the list ingatsby-config.js
, the build/dev process will run just fine.Please note: I am using node-canvas inside the node process, not in a react component.
Running node-canvas in gatsby v4 (with the corresponding sharp-plugin) works just fine.
This is what the error looks like:
note: i have replaced actual path to this project with "[ ... ] root"
I have also tried several method that where suggested to fix this issue, like:
Reproduction Link
https://github.com/f-kottek/gatsby-canvas-import-bug-repo
Steps to Reproduce
clone and install the repository (Obviously)
Expected Result
successful build with node-canvas working
Actual Result
Environment
Config Flags
No response
The text was updated successfully, but these errors were encountered: