question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

updating gatsby-plugin-sharp from 2.8.0 to 2.9.0 breaks build

See original GitHub issue

Description

error pngload: non-recoverable state                                                   
pngload: non-recoverable state                                                         
vips2png: unable to write to target target                                             
                                                                                       
                                                                                       
                                                                                       
  Error: pngload: non-recoverable state                                                
  pngload: non-recoverable state                                                       
  vips2png: unable to write to target target                                           
                                                                                       
not finished run page queries - 1.474s                                                 
not finished Generating image thumbnails - 1.299s                                      
error Command failed with exit code 1.  

I can up- and downgrade repeatedly. v2.8.0 always works, v2.9.0 always errors.

Steps to reproduce

This is a complex app. I have no idea if this happens generally.

  1. clone https://github.com/barbalex/apf2
  2. check that gatsby-plugin-sharp is set to v2.8.0
  3. yarn && yarn dev > should succeed
  4. set gatsby-plugin-sharp to v2.9.0 > should error

Expected result

Build should succeed

Actual result

see above

Environment

Run gatsby info --clipboard in your project directory and paste the output here.

$ yarn gatsby info --clipboard
yarn run v1.22.5
$ C:\Users\alexa\apf2\node_modules\.bin\gatsby info --clipboard

  System:
    OS: Windows 10 10.0.19042
    CPU: (16) x64 Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
  Binaries:
    Node: 15.0.1 - ~\AppData\Local\Temp\yarn--1605869962190-0.9665755114141126\node.CMD
    Yarn: 1.22.5 - ~\AppData\Local\Temp\yarn--1605869962190-0.9665755114141126\yarn.CMD
    npm: 7.0.3 - C:\Program Files\nodejs\npm.CMD
  Languages:
    Python: 2.7.17
  Browsers:
    Chrome: 86.0.4240.198
    Edge: Spartan (44.19041.423.0), Chromium (86.0.622.69)
  npmPackages:
    gatsby: 2.27.0 => 2.27.0
    gatsby-cli: 2.14.0 => 2.14.0
    gatsby-image: 2.6.0 => 2.6.0
    gatsby-plugin-create-client-paths: 2.5.0 => 2.5.0
    gatsby-plugin-eslint: 2.0.8 => 2.0.8
    gatsby-plugin-manifest: 2.7.0 => 2.7.0
    gatsby-plugin-offline: 3.5.0 => 3.5.0
    gatsby-plugin-react-helmet: 3.5.0 => 3.5.0
    gatsby-plugin-sharp: 2.8.0 => 2.8.0
    gatsby-plugin-styled-components: 3.5.0 => 3.5.0
    gatsby-plugin-typography: 2.7.0 => 2.7.0
    gatsby-remark-autolink-headers: 2.6.0 => 2.6.0
    gatsby-remark-copy-linked-files: 2.5.0 => 2.5.0
    gatsby-remark-embed-video: 3.0.10 => 3.0.10
    gatsby-remark-emojis: 0.4.3 => 0.4.3
    gatsby-remark-external-links: 0.0.4 => 0.0.4
    gatsby-remark-images: 3.6.0 => 3.6.0
    gatsby-remark-images-medium-zoom: 1.7.0 => 1.7.0
    gatsby-remark-numbered-footnotes: 1.0.1 => 1.0.1
    gatsby-remark-prismjs: 3.8.0 => 3.8.0
    gatsby-source-filesystem: 2.6.0 => 2.6.0
    gatsby-transformer-remark: 2.11.0 => 2.11.0
    gatsby-transformer-sharp: 2.7.0 => 2.7.0

Done in 1.99s.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:46 (15 by maintainers)

github_iconTop GitHub Comments

7reactions
mlensercommented, Jan 8, 2021

I found the issue to be multiple versions of sharp. If I upgraded

  • gatsby-plugin-manifest (to 2.10.0)
  • gatsby-plugin-sharp (to 2.12.0)
  • gatsby-transformer-sharp (to 2.10.0)

Then when running yarn why sharp I only had sharp@0.27.0 and things seem to work as expected.

5reactions
barbalexcommented, Dec 7, 2020

@vladar In gatsby-config.js I changed 'gatsby-plugin-sharp' to:

{ resolve: 'gatsby-plugin-sharp', options: { failOnError: false } }

But I still get the same error when using "gatsby-plugin-sharp": "2.10.0".

Read more comments on GitHub >

github_iconTop Results From Across the Web

updating gatsby-plugin-sharp from 2.8.0 to 2.9.0 breaks build
updating gatsby-plugin-sharp from 2.8.0 to 2.9.0 breaks build.
Read more >
Migrating from v3 to v4 - Gatsby
Before upgrading to v4 we highly recommend upgrading gatsby (and all plugins) to the latest v3 version. Some changes required for Gatsby 4...
Read more >
gatsby-plugin-sharp | Yarn - Package Manager
Exposes several image processing functions built on the Sharp image processing library. This is a low-level helper plugin generally used by other Gatsby...
Read more >
Gatsby fails to build pages on netlify: WebpackError: Minified ...
Please, upgrade your dependencies to the actual version of core-js. 9:16:50 AM: > sharp@0.28.2 install /opt/build/repo/node_modules/sharp 9:16:50 AM: ...
Read more >
What are the dependencies of `gatsby-plugin-sharp` and ...
NPM may have resolved its dependencies, but when mozjpeg 's post-install script is call it tries to build itself from source and fails....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found