Error "gatsby-plugin-manifest" Input file contains unsupported image format

I’m getting an unsupported image error when trying to deploy my Gatsby site to Netlify.

The error is from the gatsby-plugin-manifest, see screenshot below.

The build works locally and I’ve set my netlify.toml file so Netlify uses the same node version in netlify as it does on local.

My package.json file looks like the below.

The image I’m using is just a PNG, and the Gatsby config settings are definitely pointing to the correct the correct file, or it would fail on my local to, and Ive checked to make sure the image is actually in the repo, which it is.

{
  "name": "test",
  "description": "Example Gatsby, and Netlify CMS project",
  "version": "1.1.3",
  "author": "test",
  "dependencies": {
    "@babel/eslint-parser": "7.18.2",
    "@gatsbyjs/reach-router": "1.3.7",
    "@vimeo/player": "2.17.0",
    "babel-preset-gatsby": "2.17.0",
    "dotenv": "16.0.1",
    "gatsby": "4.18.0",
    "gatsby-link": "4.17.0",
    "gatsby-plugin-image": "2.17.0",
    "gatsby-plugin-manifest": "4.18.0",
    "gatsby-plugin-netlify": "5.0.0",
    "gatsby-plugin-netlify-cms": "6.17.0",
    "gatsby-plugin-offline": "5.17.0",
    "gatsby-plugin-react-helmet": "5.17.0",
    "gatsby-plugin-react-svg": "3.1.0",
    "gatsby-plugin-robots-txt": "1.7.1",
    "gatsby-plugin-sass": "5.17.0",
    "gatsby-plugin-sharp": "4.18.0",
    "gatsby-remark-copy-linked-files": "5.17.0",
    "gatsby-remark-images": "6.17.0",
    "gatsby-remark-relative-images": "0.3.0",
    "gatsby-source-filesystem": "4.17.0",
    "gatsby-transformer-remark": "5.17.0",
    "gatsby-transformer-sharp": "4.18.0",
    "lodash": "4.17.21",
    "lodash-webpack-plugin": "0.11.6",
    "netlify-cms-app": "2.15.72",
    "netlify-cms-media-library-uploadcare": "0.5.10",
    "prop-types": "15.8.1",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-helmet": "6.1.0",
    "react-lazy-load-image-component": "1.5.4",
    "react-markdown": "8.0.3",
    "react-parallax": "3.5.1",
    "remark-gfm": "3.0.1",
    "sass": "1.53.0"
  },
  "keywords": [
    "gatsby"
  ],
  "license": "MIT",
  "main": "n/a",
  "scripts": {
    "clean": "gatsby clean",
    "start": "npm run develop",
    "build": "npm run clean && gatsby build",
    "develop": "npm run clean && gatsby develop",
    "serve": "gatsby serve",
    "format": "prettier --trailing-comma es5 --no-semi --single-quote --write \"{gatsby-*.js,src/**/*.js}\"",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "devDependencies": {
    "@babel/plugin-proposal-decorators": "7.18.2",
    "eslint": "8.18.0",
    "eslint-config-airbnb": "19.0.4",
    "eslint-plugin-import": "2.26.0",
    "eslint-plugin-jsx-a11y": "6.6.0",
    "eslint-plugin-react": "7.30.1",
    "eslint-plugin-react-hooks": "4.6.0",
    "gatsby-plugin-eslint": "4.0.2"
  },
  "engines": {
    "node": ">= 16.15.0"
  }
}

Hey there, @cdennington :wave:

Thanks for reaching out. Can you please share your link to your netlify site as well as your most recent deploy log? This will help us look into this further.

Thanks!

Hey @hillary, sorry for the delay.

The site is still in development on the following URL: https://strong-cannoli-27ad08.netlify.app

The last build log is below, this is from just now, with the same error. Ive also confirmed it is building locally without an issue:

12:07:07 PM: Build ready to start
12:07:09 PM: build-image version: 0e2f4c52031ab562db66aec633308326e3b108d0 (focal)
12:07:09 PM: build-image tag: focal
12:07:09 PM: buildbot version: 0d1cf41e4e345a224c39ab2a783aa4af5c76f6e8
12:07:09 PM: Fetching cached dependencies
12:07:09 PM: Starting to download cache of 323.6MB
12:07:11 PM: Finished downloading cache in 2.492852154s
12:07:11 PM: Starting to extract cache
12:07:21 PM: Finished extracting cache in 10.055849921s
12:07:21 PM: Finished fetching cache in 12.653139611s
12:07:21 PM: Starting to prepare the repo for build
12:07:22 PM: Preparing Git Reference refs/heads/master
12:07:23 PM: Parsing package.json dependencies
12:07:24 PM: Different functions path detected, going to use the one specified in the Netlify configuration file: 'functions' versus './functions' in the Netlify UI
12:07:24 PM: Starting build script
12:07:24 PM: Installing dependencies
12:07:24 PM: Python version set to 2.7
12:07:25 PM: Started restoring cached node version
12:07:26 PM: Finished restoring cached node version
12:07:26 PM: v16.15.0 is already installed.
12:07:27 PM: Now using node v16.15.0 (npm v8.5.5)
12:07:27 PM: Started restoring cached build plugins
12:07:27 PM: Finished restoring cached build plugins
12:07:27 PM: Attempting ruby version 2.7.2, read from environment
12:07:28 PM: Using ruby version 2.7.2
12:07:28 PM: Using PHP version 8.0
12:07:29 PM: No npm workspaces detected
12:07:29 PM: Started restoring cached node modules
12:07:29 PM: Finished restoring cached node modules
12:07:29 PM: Installing NPM modules using NPM version 8.5.5
12:07:57 PM: added 41 packages, removed 22 packages, changed 52 packages, and audited 2509 packages in 27s
12:07:57 PM: 435 packages are looking for funding
12:07:57 PM:   run `npm fund` for details
12:07:57 PM: 56 vulnerabilities (9 moderate, 47 high)
12:07:57 PM: To address issues that do not require attention, run:
12:07:57 PM:   npm audit fix
12:07:57 PM: To address all issues possible (including breaking changes), run:
12:07:57 PM:   npm audit fix --force
12:07:57 PM: Some issues need review, and may require choosing
12:07:57 PM: a different dependency.
12:07:57 PM: Run `npm audit` for details.
12:07:57 PM: NPM modules installed
12:07:57 PM: Started restoring cached go cache
12:07:57 PM: Finished restoring cached go cache
12:07:57 PM: Installing Go version 1.17 (requested 1.17)
12:08:03 PM: unset GOOS;
12:08:03 PM: unset GOARCH;
12:08:03 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.17.linux.amd64';
12:08:03 PM: export PATH="/opt/buildhome/.gimme/versions/go1.17.linux.amd64/bin:${PATH}";
12:08:03 PM: go version >&2;
12:08:03 PM: export GIMME_ENV="/opt/buildhome/.gimme/env/go1.17.linux.amd64.env"
12:08:03 PM: go version go1.17 linux/amd64
12:08:03 PM: Installing missing commands
12:08:03 PM: Verify run directory
12:08:05 PM: ​
12:08:05 PM: ────────────────────────────────────────────────────────────────
12:08:05 PM:   Netlify Build                                                 
12:08:05 PM: ────────────────────────────────────────────────────────────────
12:08:05 PM: ​
12:08:05 PM: ❯ Version
12:08:05 PM:   @netlify/build 27.3.4
12:08:05 PM: ​
12:08:05 PM: ❯ Flags
12:08:05 PM:   baseRelDir: true
12:08:05 PM:   buildId: 62d4c04b62f1850009c5af82
12:08:05 PM:   deployId: 62d4c04b62f1850009c5af84
12:08:05 PM: ​
12:08:05 PM: ❯ Current directory
12:08:05 PM:   /opt/build/repo
12:08:05 PM: ​
12:08:05 PM: ❯ Config file
12:08:05 PM:   /opt/build/repo/netlify.toml
12:08:05 PM: ​
12:08:05 PM: ❯ Context
12:08:05 PM:   production
12:08:05 PM: ​
12:08:05 PM: ❯ Installing plugins
12:08:05 PM:    - @netlify/plugin-gatsby@3.3.0
12:08:07 PM: ​
12:08:07 PM: ❯ Loading plugins
12:08:07 PM:    - @netlify/plugin-gatsby@3.3.0 from Netlify app
12:08:08 PM: ​
12:08:08 PM: ────────────────────────────────────────────────────────────────
12:08:08 PM:   1. @netlify/plugin-gatsby (onPreBuild event)                  
12:08:08 PM: ────────────────────────────────────────────────────────────────
12:08:08 PM: ​
12:08:09 PM: Found a Gatsby cache. We’re about to go FAST. ⚡️
12:08:09 PM: ​
12:08:09 PM: (@netlify/plugin-gatsby onPreBuild completed in 997ms)
12:08:09 PM: ​
12:08:09 PM: ────────────────────────────────────────────────────────────────
12:08:09 PM:   2. build.command from netlify.toml                            
12:08:09 PM: ────────────────────────────────────────────────────────────────
12:08:09 PM: ​
12:08:09 PM: $ npm run build
12:08:10 PM: > paul-gawman@1.1.3 build
12:08:10 PM: > npm run clean && gatsby build
12:08:10 PM: > paul-gawman@1.1.3 clean
12:08:10 PM: > gatsby clean
12:08:11 PM: info Deleting .cache, public, /opt/build/repo/node_modules/.cache/babel-loader, /opt/build/repo/node_modules/.cache/terser-webpack-plugin
12:08:11 PM: info Successfully deleted directories
12:08:14 PM: success compile gatsby files - 0.982s
12:08:15 PM: success load gatsby config - 0.291s
12:08:16 PM: warning Warning: there are unknown plugin options for "gatsby-plugin-sass": additionalData
12:08:16 PM: Please open an issue at https://ghub.io/gatsby-plugin-sass if you believe this option is valid.
12:08:16 PM: success load plugins - 1.396s
12:08:16 PM: success onPreInit - 0.007s
12:08:16 PM: success initialize cache - 0.076s
12:08:16 PM: success copy gatsby files - 0.148s
12:08:17 PM: success Compiling Gatsby Functions - 0.208s
12:08:17 PM: success onPreBootstrap - 0.218s
12:08:17 PM: success createSchemaCustomization - 0.007s
12:08:18 PM: success Checking for changed pages - 0.000s
12:08:18 PM: success source and transform nodes - 1.631s
12:08:19 PM: info Writing GraphQL type definitions to /opt/build/repo/.cache/schema.gql
12:08:20 PM: success building schema - 1.615s
12:08:20 PM: success createPages - 0.189s
12:08:20 PM: success createPagesStatefully - 0.299s
12:08:20 PM: info Total nodes: 226, SitePage nodes: 29 (use --verbose for breakdown)
12:08:20 PM: success Checking for changed pages - 0.000s
12:08:20 PM: success onPreExtractQueries - 0.000s
12:08:25 PM: success extract queries from components - 5.013s
12:08:25 PM: success write out redirect data - 0.010s
12:08:25 PM: success Build manifest and related icons - 0.007s
12:08:25 PM: error "gatsby-plugin-manifest" threw an error while running the onPostBootstrap lifecycle:
12:08:25 PM: Input file contains unsupported image format
12:08:25 PM: 
12:08:25 PM: 
12:08:25 PM:   Error: Input file contains unsupported image format
12:08:25 PM: 
12:08:25 PM: not finished onPostBootstrap - 0.060s
12:08:26 PM: ​
12:08:26 PM: ────────────────────────────────────────────────────────────────
12:08:26 PM:   "build.command" failed                                        
12:08:26 PM: ────────────────────────────────────────────────────────────────
12:08:26 PM: ​
12:08:26 PM:   Error message
12:08:26 PM:   Command failed with exit code 1: npm run build (https://ntl.fyi/exit-code-1)
12:08:26 PM: ​
12:08:26 PM:   Error location
12:08:26 PM:   In build.command from netlify.toml:
12:08:26 PM:   npm run build
12:08:26 PM: ​
12:08:26 PM:   Resolved config
12:08:26 PM:   build:
12:08:26 PM:     base: /opt/build/repo
12:08:26 PM:     command: npm run build
12:08:26 PM:     commandOrigin: config
12:08:26 PM:     environment:
12:08:26 PM:       - GATSBY_SITE_URL
12:08:26 PM:       - SHARP_IGNORE_GLOBAL_LIBVIPS
12:08:26 PM:       - NODE_VERSION
12:08:26 PM:     publish: /opt/build/repo/public
12:08:26 PM:     publishOrigin: config
12:08:26 PM:   functionsDirectory: /opt/build/repo/functions
12:08:26 PM:   headers:
12:08:26 PM:     - for: /*      values:        Referrer-Policy: same-origin        X-Content-Type-Options: nosniff        X-Frame-Options: DENY        X-XSS-Protection: 1; mode=block    - for: /component---cache-caches-gatsby-plugin-offline-app-shell-js-2c801fdf2c5a57777c58.js      values:        Cache-Control: public, max-age=31536000, immutable    - for: /styles.555a09eb53c18c3245bf.css      values:        Cache-Control: public, max-age=31536000, immutable    - for: /commons-54854904cf25ebbcb33f.js      values:        Cache-Control: public, max-age=31536000, immutable    - for: /e5da9034732830a3917e4126a3886eaba861f27b-d44cb25f02d36915b830.js      values:        Cache-Control: public, max-age=31536000, immutable    - for: /711709e9f1025a3023a5d62c81607c9d46300a29-86a7eada4e7831ffa309.js      values:        Cache-Control: public, max-age=31536000, immutable    - for: /fd98a7bdf9f819645a3d7c8273cde16e6a087e30-b47d4a543627a4ea49fa.js      values:        Cache-Control: public, max-age=31536000, immutable    - for: /component---src-templates-gallery-js-9f467c77714b6f635912.js      values:        Cache-Control: public, max-age=31536000, immutable    - for: /component---src-templates-sketchbook-js-9be971d10b55883e6d50.js      values:        Cache-Control: public, max-age=31536000, immutable    - for: /fd180c1b2af7c7058ca7f29111b44de3449c636a-8f6e3a6be20050d05d24.js      values:        Cache-Control: public, max-age=31536000, immutable    - for: /component---src-templates-page-js-546fb23c0ee37328354a.js      values:        Cache-Control: public, max-age=31536000, immutable    - for: /component---src-pages-404-js-ea92c8a01fe1a7ff97ac.js      values:        Cache-Control: public, max-age=31536000, immutable    - for: /component---src-pages-index-js-bed889add520890ca063.js      values:        Cache-Control: public, max-age=31536000, immutable    - for: /webpack-runtime-fe804efd7886500bba27.js      values:        Cache-Control: public, max-age=31536000, immutable    - for: /framework-852878e164fa129e2c0d.js      values:        Cache-Control: public, max-age=31536000, immutable    - for: /532a2f07-79fdd825b268d23caf9f.js      values:        Cache-Control: public, max-age=31536000, immutable    - for: /app-c993e1a23d28c882425f.js      values:        Cache-Control: public, max-age=31536000, immutable    - for: /static/*      values:        Cache-Control: public, max-age=31536000, immutable    - for: /sw.js      values:        Cache-Control: no-cache  plugins:    - inputs: {}      origin: ui      package: '@netlify/plugin-gatsby'  redirects:    - from: /about-1      status: 301      to: /about    - from: /contact-1      status: 301      to: /contact    - from: /blog1/*      status: 301      to: /sketchbook/:splat  redirectsOrigin: configCaching artifacts
12:08:26 PM: Started saving node modules
12:08:26 PM: Finished saving node modules
12:08:26 PM: Started saving build plugins
12:08:26 PM: Finished saving build plugins
12:08:26 PM: Started saving pip cache
12:08:26 PM: Finished saving pip cache
12:08:26 PM: Started saving emacs cask dependencies
12:08:26 PM: Finished saving emacs cask dependencies
12:08:26 PM: Started saving maven dependencies
12:08:26 PM: Finished saving maven dependencies
12:08:26 PM: Started saving boot dependencies
12:08:26 PM: Finished saving boot dependencies
12:08:26 PM: Started saving rust rustup cache
12:08:26 PM: Finished saving rust rustup cache
12:08:26 PM: Started saving go dependencies
12:08:26 PM: Finished saving go dependencies
12:08:26 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
12:08:26 PM: Creating deploy upload records
12:08:27 PM: Failing build: Failed to build site
12:08:27 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
12:08:27 PM: Finished processing build request in 1m18.307836512s

:wave: @cdennington ,

Can you try deleting package.lock.json and let us know if that helps clear up the error?

Hi @audrey

Deleted the lock file, and cleared cache on both local and netlify.

Local still builds without issues, but in netlify I’m now getting a dependency conflict error. log below. I actually updated the packages to try and fix this issue, which is frustrating.

8:16:45 AM: Build ready to start
8:17:08 AM: build-image version: 0e2f4c52031ab562db66aec633308326e3b108d0 (focal)
8:17:08 AM: build-image tag: focal
8:17:08 AM: buildbot version: 0d1cf41e4e345a224c39ab2a783aa4af5c76f6e8
8:17:08 AM: Building without cache
8:17:08 AM: Starting to prepare the repo for build
8:17:08 AM: No cached dependencies found. Cloning fresh repo
8:17:08 AM: git clone https://github.com/cdennington/paul-gawman
8:17:09 AM: Preparing Git Reference refs/heads/master
8:17:10 AM: Parsing package.json dependencies
8:17:11 AM: Different functions path detected, going to use the one specified in the Netlify configuration file: 'functions' versus './functions' in the Netlify UI
8:17:11 AM: Starting build script
8:17:11 AM: Installing dependencies
8:17:11 AM: Python version set to 2.7
8:17:12 AM: Downloading and installing node v16.15.0...
8:17:12 AM: Downloading https://nodejs.org/dist/v16.15.0/node-v16.15.0-linux-x64.tar.xz...
8:17:13 AM: Computing checksum with sha256sum
8:17:13 AM: Checksums matched!
8:17:15 AM: Now using node v16.15.0 (npm v8.5.5)
8:17:15 AM: Started restoring cached build plugins
8:17:15 AM: Finished restoring cached build plugins
8:17:15 AM: Attempting ruby version 2.7.2, read from environment
8:17:16 AM: Using ruby version 2.7.2
8:17:17 AM: Using PHP version 8.0
8:17:17 AM: No npm workspaces detected
8:17:17 AM: Started restoring cached node modules
8:17:17 AM: Finished restoring cached node modules
8:17:17 AM: Installing NPM modules using NPM version 8.5.5
8:17:21 AM: npm ERR! code ERESOLVE
8:17:21 AM: npm ERR! ERESOLVE unable to resolve dependency tree
8:17:21 AM: npm ERR!
8:17:21 AM: Creating deploy upload records
8:17:21 AM: npm ERR! While resolving: paul-gawman@1.1.3
8:17:21 AM: npm ERR! Found: react@18.2.0
8:17:21 AM: npm ERR! node_modules/react
8:17:21 AM: npm ERR!   react@"18.2.0" from the root project
8:17:21 AM: npm ERR!   peer react@"^16.9.0 || ^17.0.0 || ^18.0.0" from gatsby-plugin-netlify-cms@6.18.0
8:17:21 AM: Failed during stage 'building site': Build script returned non-zero exit code: 1
8:17:21 AM: npm ERR!   node_modules/gatsby-plugin-netlify-cms
8:17:21 AM: npm ERR!     gatsby-plugin-netlify-cms@"6.18.0" from the root project
8:17:21 AM: npm ERR!   2 more (gatsby, react-dom)
8:17:21 AM: npm ERR!
8:17:21 AM: npm ERR! Could not resolve dependency:
8:17:21 AM: npm ERR! peer react@"^16.8.4 || ^17.0.0" from netlify-cms-app@2.15.72
8:17:21 AM: npm ERR! node_modules/netlify-cms-app
8:17:21 AM: npm ERR!   netlify-cms-app@"2.15.72" from the root project
8:17:21 AM: npm ERR!   peer netlify-cms-app@"^2.9.0" from gatsby-plugin-netlify-cms@6.18.0
8:17:21 AM: npm ERR!   node_modules/gatsby-plugin-netlify-cms
8:17:21 AM: npm ERR!     gatsby-plugin-netlify-cms@"6.18.0" from the root project
8:17:21 AM: npm ERR!
8:17:21 AM: npm ERR! Fix the upstream dependency conflict, or retry
8:17:21 AM: npm ERR! this command with --force, or --legacy-peer-deps
8:17:21 AM: npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
8:17:21 AM: npm ERR!
8:17:21 AM: npm ERR! See /opt/buildhome/.npm/eresolve-report.txt for a full report.
8:17:21 AM: npm ERR! A complete log of this run can be found in:
8:17:21 AM: npm ERR!     /opt/buildhome/.npm/_logs/2022-07-18T22_17_18_227Z-debug-0.log
8:17:21 AM: Error during NPM install
8:17:21 AM: Build was terminated: Build script returned non-zero exit code: 1
8:17:21 AM: Failing build: Failed to build site
8:17:21 AM: Finished processing build request in 13.624618749s

Just following on from this, I am unable to get the dependency conflict on my local, even after removing node_modules and lock file and reinstalling.

I was able to get the netlify build passed the dependency issue, by setting the following in my netlify.toml file, with the NPM and node version I am using locally.

[build.environment]
  NODE_VERSION = "16.15.0"
  NPM_VERSION = "8.12.1"
  NPM_FLAGS = "--legacy-peer-deps"

However, this has lead me back to the initial error regarding the icon being not supported. Log below from latest build.

9:36:09 AM: Build ready to start
9:36:11 AM: build-image version: 0e2f4c52031ab562db66aec633308326e3b108d0 (focal)
9:36:11 AM: build-image tag: focal
9:36:11 AM: buildbot version: 0d1cf41e4e345a224c39ab2a783aa4af5c76f6e8
9:36:11 AM: Fetching cached dependencies
9:36:11 AM: Starting to download cache of 323.6MB
9:36:13 AM: Finished downloading cache in 2.414089236s
9:36:13 AM: Starting to extract cache
9:36:23 AM: Finished extracting cache in 10.101680487s
9:36:23 AM: Finished fetching cache in 12.628359066s
9:36:23 AM: Starting to prepare the repo for build
9:36:24 AM: Preparing Git Reference refs/heads/master
9:36:26 AM: Parsing package.json dependencies
9:36:26 AM: Different functions path detected, going to use the one specified in the Netlify configuration file: 'functions' versus './functions' in the Netlify UI
9:36:27 AM: Starting build script
9:36:27 AM: Installing dependencies
9:36:27 AM: Python version set to 2.7
9:36:27 AM: Started restoring cached node version
9:36:28 AM: Finished restoring cached node version
9:36:29 AM: v16.15.0 is already installed.
9:36:29 AM: Now using node v16.15.0 (npm v8.5.5)
9:36:29 AM: Started restoring cached build plugins
9:36:29 AM: Finished restoring cached build plugins
9:36:29 AM: Attempting ruby version 2.7.2, read from environment
9:36:30 AM: Using ruby version 2.7.2
9:36:31 AM: Using PHP version 8.0
9:36:31 AM: No npm workspaces detected
9:36:31 AM: Started restoring cached node modules
9:36:31 AM: Finished restoring cached node modules
9:36:32 AM: Found npm version (8.5.5) that doesn't match expected (8.12.1)Installing npm at version 8.12.1
9:36:35 AM: removed 6 packages, changed 74 packages, and audited 202 packages in 3s
9:36:35 AM: 11 packages are looking for funding
9:36:35 AM:   run `npm fund` for details
9:36:35 AM: found 0 vulnerabilities
9:36:35 AM: NPM installed successfully
9:36:35 AM: Installing NPM modules using NPM version 8.12.1
9:36:36 AM: npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
9:36:36 AM: npm WARN config location in the cache, and they are managed by
9:36:36 AM: npm WARN config     [`cacache`](http://npm.im/cacache).
9:36:36 AM: npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
9:36:36 AM: npm WARN config location in the cache, and they are managed by
9:36:36 AM: npm WARN config     [`cacache`](http://npm.im/cacache).
9:37:12 AM: added 41 packages, removed 20 packages, changed 35 packages, and audited 2511 packages in 36s
9:37:12 AM: 434 packages are looking for funding
9:37:12 AM:   run `npm fund` for details
9:37:13 AM: 66 vulnerabilities (28 moderate, 38 high)
9:37:13 AM: To address issues that do not require attention, run:
9:37:13 AM:   npm audit fix
9:37:13 AM: To address all issues possible (including breaking changes), run:
9:37:13 AM:   npm audit fix --force
9:37:13 AM: Some issues need review, and may require choosing
9:37:13 AM: a different dependency.
9:37:13 AM: Run `npm audit` for details.
9:37:13 AM: NPM modules installed
9:37:13 AM: npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
9:37:13 AM: npm WARN config location in the cache, and they are managed by
9:37:13 AM: npm WARN config     [`cacache`](http://npm.im/cacache).
9:37:13 AM: Started restoring cached go cache
9:37:13 AM: Finished restoring cached go cache
9:37:13 AM: Installing Go version 1.17 (requested 1.17)
9:37:20 AM: unset GOOS;
9:37:20 AM: unset GOARCH;
9:37:20 AM: export GOROOT='/opt/buildhome/.gimme/versions/go1.17.linux.amd64';
9:37:20 AM: export PATH="/opt/buildhome/.gimme/versions/go1.17.linux.amd64/bin:${PATH}";
9:37:20 AM: go version >&2;
9:37:20 AM: export GIMME_ENV="/opt/buildhome/.gimme/env/go1.17.linux.amd64.env"
9:37:20 AM: go version go1.17 linux/amd64
9:37:20 AM: Installing missing commands
9:37:20 AM: Verify run directory
9:37:21 AM: ​
9:37:21 AM: ────────────────────────────────────────────────────────────────
9:37:21 AM:   Netlify Build                                                 
9:37:21 AM: ────────────────────────────────────────────────────────────────
9:37:21 AM: ​
9:37:21 AM: ❯ Version
9:37:21 AM:   @netlify/build 27.3.4
9:37:21 AM: ​
9:37:21 AM: ❯ Flags
9:37:21 AM:   baseRelDir: true
9:37:21 AM:   buildId: 62d5ee69834e090008f0bbd6
9:37:21 AM:   deployId: 62d5ee69834e090008f0bbd8
9:37:21 AM: ​
9:37:21 AM: ❯ Current directory
9:37:21 AM:   /opt/build/repo
9:37:21 AM: ​
9:37:21 AM: ❯ Config file
9:37:21 AM:   /opt/build/repo/netlify.toml
9:37:21 AM: ​
9:37:21 AM: ❯ Context
9:37:21 AM:   production
9:37:21 AM: ​
9:37:21 AM: ❯ Installing plugins
9:37:21 AM:    - @netlify/plugin-gatsby@3.3.1
9:37:23 AM: ​
9:37:23 AM: ❯ Loading plugins
9:37:23 AM:    - @netlify/plugin-gatsby@3.3.1 from Netlify app
9:37:24 AM: ​
9:37:24 AM: ────────────────────────────────────────────────────────────────
9:37:24 AM:   1. @netlify/plugin-gatsby (onPreBuild event)                  
9:37:24 AM: ────────────────────────────────────────────────────────────────
9:37:24 AM: ​
9:37:25 AM: Found a Gatsby cache. We’re about to go FAST. ⚡️
9:37:25 AM: ​
9:37:25 AM: (@netlify/plugin-gatsby onPreBuild completed in 932ms)
9:37:25 AM: ​
9:37:25 AM: ────────────────────────────────────────────────────────────────
9:37:25 AM:   2. build.command from netlify.toml                            
9:37:25 AM: ────────────────────────────────────────────────────────────────
9:37:25 AM: ​
9:37:25 AM: $ npm run build
9:37:25 AM: npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
9:37:25 AM: npm WARN config location in the cache, and they are managed by
9:37:25 AM: npm WARN config     [`cacache`](http://npm.im/cacache).
9:37:25 AM: > paul-gawman@1.1.3 build
9:37:25 AM: > npm run clean && gatsby build
9:37:26 AM: npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
9:37:26 AM: npm WARN config location in the cache, and they are managed by
9:37:26 AM: npm WARN config     [`cacache`](http://npm.im/cacache).
9:37:26 AM: > paul-gawman@1.1.3 clean
9:37:26 AM: > gatsby clean
9:37:26 AM: info Deleting .cache, public, /opt/build/repo/node_modules/.cache/babel-loader, /opt/build/repo/node_modules/.cache/terser-webpack-plugin
9:37:27 AM: info Successfully deleted directories
9:37:30 AM: success compile gatsby files - 0.869s
9:37:30 AM: success load gatsby config - 0.264s
9:37:31 AM: warning Warning: there are unknown plugin options for "gatsby-plugin-sass": additionalData
9:37:31 AM: Please open an issue at https://ghub.io/gatsby-plugin-sass if you believe this option is valid.
9:37:31 AM: success load plugins - 1.223s
9:37:31 AM: success onPreInit - 0.005s
9:37:31 AM: success initialize cache - 0.071s
9:37:31 AM: success copy gatsby files - 0.128s
9:37:31 AM: success Compiling Gatsby Functions - 0.195s
9:37:32 AM: success onPreBootstrap - 0.205s
9:37:32 AM: success createSchemaCustomization - 0.007s
9:37:33 AM: success Checking for changed pages - 0.000s
9:37:33 AM: success source and transform nodes - 1.264s
9:37:33 AM: info Writing GraphQL type definitions to /opt/build/repo/.cache/schema.gql
9:37:34 AM: success building schema - 1.299s
9:37:34 AM: success createPages - 0.129s
9:37:35 AM: success createPagesStatefully - 0.284s
9:37:35 AM: info Total nodes: 226, SitePage nodes: 29 (use --verbose for breakdown)
9:37:35 AM: success Checking for changed pages - 0.000s
9:37:35 AM: success onPreExtractQueries - 0.000s
9:37:42 AM: warning Warning: there are unknown plugin options for "gatsby-plugin-sass": additionalData
9:37:42 AM: Please open an issue at https://ghub.io/gatsby-plugin-sass if you believe this option is valid.
9:37:42 AM: warning Warning: there are unknown plugin options for "gatsby-plugin-sass": additionalData
9:37:42 AM: Please open an issue at https://ghub.io/gatsby-plugin-sass if you believe this option is valid.
9:37:42 AM: warning Warning: there are unknown plugin options for "gatsby-plugin-sass": additionalData
9:37:42 AM: Please open an issue at https://ghub.io/gatsby-plugin-sass if you believe this option is valid.
9:37:42 AM: success extract queries from components - 7.399s
9:37:42 AM: success write out redirect data - 0.002s
9:37:42 AM: success Build manifest and related icons - 0.004s
9:37:42 AM: error "gatsby-plugin-manifest" threw an error while running the onPostBootstrap lifecycle:
9:37:42 AM: Input file contains unsupported image format
9:37:42 AM: 
9:37:42 AM: 
9:37:42 AM:   Error: Input file contains unsupported image format
9:37:42 AM: 
9:37:42 AM: not finished onPostBootstrap - 0.095s
9:37:42 AM: ​
9:37:42 AM: ────────────────────────────────────────────────────────────────
9:37:42 AM:   "build.command" failed                                        
9:37:42 AM: ────────────────────────────────────────────────────────────────
9:37:42 AM: ​
9:37:42 AM:   Error message
9:37:42 AM:   Command failed with exit code 1: npm run build (https://ntl.fyi/exit-code-1)
9:37:42 AM: ​
9:37:42 AM:   Error location
9:37:42 AM:   In build.command from netlify.toml:
9:37:42 AM:   npm run build
9:37:42 AM: ​
9:37:42 AM:   Resolved config
9:37:43 AM:   build:
9:37:43 AM:     base: /opt/build/repo
9:37:43 AM:     command: npm run build
9:37:43 AM: Creating deploy upload records
9:37:43 AM:     commandOrigin: config
9:37:43 AM:     environment:
9:37:43 AM:       - GATSBY_SITE_URL
9:37:43 AM:       - SHARP_IGNORE_GLOBAL_LIBVIPS
9:37:43 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
9:37:43 AM:       - NODE_VERSION
9:37:43 AM:       - NPM_VERSION
9:37:43 AM:       - NPM_FLAGS
9:37:43 AM:     publish: /opt/build/repo/public
9:37:43 AM:     publishOrigin: config
9:37:43 AM:   functionsDirectory: /opt/build/repo/functions
9:37:43 AM:   headers:
9:37:43 AM:     - for: /*      values:        Referrer-Policy: same-origin        X-Content-Type-Options: nosniff        X-Frame-Options: DENY        X-XSS-Protection: 1; mode=block    - for: /component---cache-caches-gatsby-plugin-offline-app-shell-js-2c801fdf2c5a57777c58.js      values:        Cache-Control: public, max-age=31536000, immutable    - for: /styles.555a09eb53c18c3245bf.css      values:        Cache-Control: public, max-age=31536000, immutable    - for: /commons-54854904cf25ebbcb33f.js      values:        Cache-Control: public, max-age=31536000, immutable    - for: /e5da9034732830a3917e4126a3886eaba861f27b-d44cb25f02d36915b830.js      values:        Cache-Control: public, max-age=31536000, immutable    - for: /711709e9f1025a3023a5d62c81607c9d46300a29-86a7eada4e7831ffa309.js      values:        Cache-Control: public, max-age=31536000, immutable    - for: /fd98a7bdf9f819645a3d7c8273cde16e6a087e30-b47d4a543627a4ea49fa.js      values:        Cache-Control: public, max-age=31536000, immutable    - for: /component---src-templates-gallery-js-9f467c77714b6f635912.js      values:        Cache-Control: public, max-age=31536000, immutable    - for: /component---src-templates-sketchbook-js-9be971d10b55883e6d50.js      values:        Cache-Control: public, max-age=31536000, immutable    - for: /fd180c1b2af7c7058ca7f29111b44de3449c636a-8f6e3a6be20050d05d24.js      values:        Cache-Control: public, max-age=31536000, immutable    - for: /component---src-templates-page-js-546fb23c0ee37328354a.js      values:        Cache-Control: public, max-age=31536000, immutable    - for: /component---src-pages-404-js-ea92c8a01fe1a7ff97ac.js      values:        Cache-Control: public, max-age=31536000, immutable    - for: /component---src-pages-index-js-bed889add520890ca063.js      values:        Cache-Control: public, max-age=31536000, immutable    - for: /webpack-runtime-fe804efd7886500bba27.js      values:        Cache-Control: public, max-age=31536000, immutable    - for: /framework-852878e164fa129e2c0d.js      values:        Cache-Control: public, max-age=31536000, immutable    - for: /532a2f07-79fdd825b268d23caf9f.js      values:        Cache-Control: public, max-age=31536000, immutable    - for: /app-c993e1a23d28c882425f.js      values:        Cache-Control: public, max-age=31536000, immutable    - for: /static/*      values:        Cache-Control: public, max-age=31536000, immutable    - for: /sw.js      values:        Cache-Control: no-cache  plugins:    - inputs: {}      origin: ui      package: '@netlify/plugin-gatsby'  redirects:    - from: /about-1      status: 301      to: /about    - from: /contact-1      status: 301      to: /contact    - from: /blog1/*      status: 301      to: /sketchbook/:splat  redirectsOrigin: configCaching artifacts
9:37:43 AM: Started saving node modules
9:37:43 AM: Finished saving node modules
9:37:43 AM: Started saving build plugins
9:37:43 AM: Finished saving build plugins
9:37:43 AM: Started saving pip cache
9:37:43 AM: Finished saving pip cache
9:37:43 AM: Started saving emacs cask dependencies
9:37:43 AM: Finished saving emacs cask dependencies
9:37:43 AM: Started saving maven dependencies
9:37:43 AM: Finished saving maven dependencies
9:37:43 AM: Started saving boot dependencies
9:37:43 AM: Finished saving boot dependencies
9:37:43 AM: Started saving rust rustup cache
9:37:43 AM: Finished saving rust rustup cache
9:37:43 AM: Started saving go dependencies
9:37:43 AM: Finished saving go dependencies
9:37:43 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
9:37:43 AM: Failing build: Failed to build site
9:37:44 AM: Finished processing build request in 1m32.859198198s

I’m also getting the same error on this development site: https://spiffy-zabaione-67a4e4.netlify.app/

Its using the same code base as the first one, the only difference is I’m using typescript on this build. I have commented out the initalisation of the gatsby-plugin-manifest plugin in gatsby-config for this build and the builds in netlify are now working.

Hi @cdennington ,

Thanks for trying that, some customers had success with it :slight_smile:

Here are other solutions that you may want to give a go:

gatsby-plugin-manifest - Input file contains unsupported image format · Issue #28204 · gatsbyjs/gatsby · GitHub

[gatsby-plugin-manifest] build fails with cryptic error if icon specified in config doesn’t exist · Issue #5638 · gatsbyjs/gatsby · GitHub

Also, try “Clear cache and retry deploy” to see if that helps the build succeed.

Thanks for coming back to me @audrey, sadly Ive already tried these examples.

I have SHARP_IGNORE_GLOBAL_LIBVIPS set as a build variable

I can also confirm the path is correct, the image is in /src/img/icon.png and my gatsby config looks like:
image

And finally Ive tried clearing the cache a redeploying a few times in the last week, but everything leads back to the same error.

I also have more than 2 Gatsby builds running on netlify, and the others appear to be working fine.

This wouldn’t explain why both are not working, but with https://strong-cannoli-27ad08.netlify.app/ I did have GIT LFS turned on, but I then removed it, I don’t suppose you need to do something on your end to stop it referencing the LFS file? I just followed these steps to delete it from the repo: Removing git lfs from (any) repository · GitHub

This wouldnt explain the same issue on https://spiffy-zabaione-67a4e4.netlify.app/ though

Thanks for the additional context @cdennington!

Could you also confirm that the image /src/img/icon.png is in the committed repo? Could you share a screenshot of the file structure or share the repo itself?

Or try cloning the repo from git in a different folder to confirm the image is in the repo?

@audrey I’m unable to share access to the repo, but I can confirm the image is in the correct folder in the repo:
image

I also tried cloning the repo down again into another folder, as you suggested, to make sure the image existed and that it was corrupted.

I also tried another PNG completely, and renaming this image, and changing the folder it was in, as well as changing the image to be a JPG and deleting the cache from .git with git rm --cached .\src\img\favicon.png, but I get the same error message each time.

Hi @cdennington,

Unfortunately, that’s as far as we can guess without a repo. We need a minimal reproduction to see what is happening here.

@hrishikesh if there is an email address for your team, I can add it to the repo within Github? I just cant make the repo public

Hey @cdennington ! While we don’t have a good team email to “invite” to your github repo (we have a mailing list that we cannot “login” to git providers using), you can instead clone your repo, and make a zipfile, and share it with us via your favorite filesharing service (google drive works well and should be free). to the address I am about to DM you (it will end in @netlify.com). That will let our Support team access it collectively so we can collaborate on trying to find a fix for your situation.

Thanks @fool, I actually had a bit of time today and thought I’d create a minimal reproduction for you.

That then lead me to notice the image in github looked broken on my current repo, see screenshot below. but on the minimal reproduction the image loaded and I wasnt running into the same issue.

I’ve changed the PNG in the problem repo to a SVG, and the problem has disappeared.

Its a weird issue as the image doesn’t appear to actually be broken within the repo, if I clone the repo out again the image works without issue, and the image works looks as a PNG running the build command.

I think it probably has something to do with LFS, which I added and then removed, but maybe for some reason Github/GIT is caching the path to the LFS file rather than the image itself, I followed the below link to remove LFS, and Ive run git lfs ls-files again and theres no files.

I’d also tried renaming and moving the file, which you’d think would bust cache, but it also had no affect.

Hey @cdennington,

Could you try starting with a blank repo and placing your files in that? If that works, that would indicate a problem with Git LFS.

As far as I know, GitHub needs to delete LFS from their end:

This was a thing in the past, not sure if it’s still relevant or if the script that you used is able to do it correctly or not.

@hrishikesh thanks, that’s good to know. I will confirm with guthub they have been successfully deleted.

If you see my comments above, I have actually already copied to a fresh repo, and experienced the same issue, which also explains my confusion around why it would be an issue with LFS.

Just to summarise, the original issue occurred on the site https://strong-cannoli-27ad08.netlify.app/ which is attached to a repo called paul-gawman, which you can see in the screenshots above.

At roughly the same time I started another job for another client, and copied the code from this repo into a new repo within Github, this site can be accessed at the following URL and experienced the same issue, but this new repo I didn’t set up LFS, however I did copy the .gitattributes file which did have the LFS reference still in it, which may have caused the same issue, although other imagery on the site worked as expected.

Sounds like you have found the root cause-- after you contact github, would you be willing to share what your final takeaway is? I think it would definitely benefit future forums members who encounter something similar.

@hillary I did find the root cause, and it turned out not to be LFS

For those of you who have had LFS added toa repo, and have then removed it, but are seeing this issue, it is a good idea to follow the steps here, as this was part of the issue.

However the solution for me was to change a line in my .gitattributes file from * text eol=crlf to * text=auto eol=crlf.

This line had been added to make sure myself and the other developer on these projects pushed code into the repo with the correct line endings, but I noticed it was also changing image files, which would then fail on build. Adding text=auto tells it to only change line endings in text or binary files and not in images, I had to recommit the image, but this fixed the issue.

Thanks for all of your help and advice.

Thank you so much for coming back and sharing this! This will definitely be beneficial for future Forums members who encounter something similar.

Happy building :rocket: