Skip to content

"gatsby-plugin-extract-image-colors" threw an error while running the onCreateNode lifecycle #14

@gfrcsd

Description

@gfrcsd

Hey,

Facing this issue while using gatsby-plugin-extract-image-colors and had no luck troubleshooting it. My implementation seems correct too as it runs fine on development server locally (despite the error showing) but fails to build.

I have already tried to add node-vibrant@3.2.0-alpha and reinstalled all dependencies

Any help would be greatly appreciated

Error Message

ERROR #11321  PLUGIN

 "gatsby-plugin-extract-image-colors" threw an error while running the onCreateNode lifecycle:

Cannot read property 'Vibrant' of undefined

  38 |       yield Vibrant.from(node.absolutePath).getPalette((err, palette) => {
  39 |         const colors = {
> 40 |           vibrant: getHex(palette.Vibrant._rgb),
     |                                   ^
  41 |           darkVibrant: getHex(palette.DarkVibrant._rgb),
  42 |           lightVibrant: getHex(palette.LightVibrant._rgb),
  43 |           muted: getHex(palette.Muted._rgb),

Relevant GraphQL

frontmatter {
  image {
    colors {
      ...GatsbyImageColors
    }
    childImageSharp {
      fluid(maxHeight: 450) {
        ...GatsbyImageSharpFluid_tracedSVG
      }
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions