gatsbyjs / gatsby

The best React-based framework with performance, scalability and security built in.
https://www.gatsbyjs.com
MIT License
55.27k stars 10.31k forks source link

error "gatsby-plugin-manifest" threw an error while running the onPostBootstrap lifecycle #28748

Closed danchistyakov closed 3 years ago

danchistyakov commented 3 years ago

Description

Describe the issue that you're seeing.

Steps to reproduce

Clear steps describing how to reproduce the issue. Please link to a reproduction, this makes your issue much easier to diagnose (seriously).

How to Make a Minimal Reproduction: https://www.gatsbyjs.com/contributing/how-to-make-a-reproducible-test-case/

Expected result

gatsby build succesfully compilation

Actual result

error "gatsby-plugin-manifest" threw an error while running the onPostBootstrap lifecycle:

20:49:08.045 | Input file contains unsupported image format 20:49:08.053 |   20:49:08.053 | Error: Input file contains unsupported image format 20:49:08.053 |   20:49:08.054 | not finished onPostBootstrap - 0.013s 20:49:09.612 | npm ERR! code ELIFECYCLE 20:49:09.612 | npm ERR! errno 1 20:49:09.617 | npm ERR! gatsby-starter-default@0.1.0 build: gatsby build 20:49:09.617 | npm ERR! Exit status 1 20:49:09.617 | npm ERR! 20:49:09.617 | npm ERR! Failed at the gatsby-starter-default@0.1.0 build script. 20:49:09.617 | npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 20:49:09.631 | npm ERR! A complete log of this run can be found in: 20:49:09.631 | npm ERR! /vercel/.npm/_logs/2020-12-23T17_49_09_617Z-debug.log 20:49:09.636 | Error: Command "npm run build" exited with 1 20:49:11.990 | Done with "package.json"

Environment

Vercel or Netlify When I run via localhost everything is working good Run gatsby info --clipboard in your project directory and paste the output here.

rolwin100 commented 3 years ago

I'm facing the same issue on netlify and local its working fine any help anyone.

danchistyakov commented 3 years ago

I'm facing the same issue on netlify and local its working fine any help anyone.

Try to run commands like @ajj-siraj in issue #28733

rolwin100 commented 3 years ago

@DCStudioProjects this issue is casued on netlify and I tried running the command npm rebuild sharp its still not workiing

danchistyakov commented 3 years ago

@DCStudioProjects this issue is casued on netlify and I tried running the command npm rebuild sharp its still not workiing

Make these step by step:

  1. Remove node_modules
  2. npm cache clean --force
  3. npm rebuild --verbose sharp
  4. Remove package-lock.json
  5. Run npm install.

It solved my problem.

JackDust24 commented 3 years ago

I had the same issue that got me stuck for hours. What I ended up doing, was following all the removing cache etc; but I changed to an earlier version of Manifest 2.6.1 and upgraded my Node to 12.6.0. After that I got it working.

billschnoebelen commented 3 years ago

@DCStudioProjects this issue is casued on netlify and I tried running the command npm rebuild sharp its still not workiing

Make these step by step:

  1. Remove node_modules
  2. npm cache clean --force
  3. npm rebuild --verbose sharp

It solved my problem

This seemed to work for me, but with additional steps. I deleted netlify, github, and package-lock.json and started over. I also deleted some of my test blogs which may have caused the issue?

danchistyakov commented 3 years ago

@DCStudioProjects this issue is casued on netlify and I tried running the command npm rebuild sharp its still not workiing

Make these step by step:

  1. Remove node_modules
  2. npm cache clean --force
  3. npm rebuild --verbose sharp

It solved my problem

This seemed to work for me, but with additional steps. I deleted netlify, github, and package-lock.json and started over. I also deleted some of my test blogs which may have caused the issue?

Yea, sure, I forgot to add a package-lock.json removing to list, I'm sorry!

billschnoebelen commented 3 years ago

@DCStudioProjects

Thanks for the help!

romulobastos commented 3 years ago

@DCStudioProjects this issue is casued on netlify and I tried running the command npm rebuild sharp its still not workiing

Make these step by step:

  1. Remove node_modules
  2. npm cache clean --force
  3. npm rebuild --verbose sharp
  4. Remove package-lock.json
  5. Run npm install.

It solved my problem.

In my case, I need to remove yarn.lock too. It works fine. Thank you! ;)

caseyocampo commented 3 years ago

@DCStudioProjects this issue is casued on netlify and I tried running the command npm rebuild sharp its still not workiing

Make these step by step:

  1. Remove node_modules
  2. npm cache clean --force
  3. npm rebuild --verbose sharp
  4. Remove package-lock.json
  5. Run npm install.

It solved my problem.

I just had this issue. Been trying to solve it for a while and this worked for me. Right now you are my hero.

mbernardes19 commented 3 years ago

@DCStudioProjects this issue is casued on netlify and I tried running the command npm rebuild sharp its still not workiing

Make these step by step:

  1. Remove node_modules
  2. npm cache clean --force
  3. npm rebuild --verbose sharp
  4. Remove package-lock.json
  5. Run npm install.

It solved my problem.

Just had to remove package-lock.json and it worked for me. Thanks a lot!

rishFilet commented 2 years ago

This did not o

@DCStudioProjects this issue is casued on netlify and I tried running the command npm rebuild sharp its still not workiing

Make these step by step:

1. Remove node_modules

2. npm cache clean --force

3. npm rebuild --verbose sharp

4. Remove package-lock.json

5. Run `npm install`.

It solved my problem.

This did not work for me and i am still getting the error:


 ERROR #11321  PLUGIN

"gatsby-plugin-manifest" threw an error while running the onPostBootstrap lifecycle:

Input file contains unsupported image format

  Error: Input file contains unsupported image format

not finished onPostBootstrap - 0.036s

 !  ~/P/R/rk-portfolio-website   develop *…  /home/rishfilet/Projects/React/rk-portfolio-website/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
        throw ex;
        ^

Error: Channel closed
    at new NodeError (node:internal/errors:371:5)
    at process.target.send (node:internal/child_process:721:16)
    at Object.sendMessage (/home/rishfilet/Projects/React/rk-portfolio-website/node_modules/gatsby-worker/dist/child.js:51:9)
    at Object.intentifiedActionCreators.<computed> [as createLog] (/home/rishfilet/Projects/React/rk-portfolio-website/node_modules/gatsby-cli/lib/reporter/reporter.js:343:9)
    at Object.info (/home/rishfilet/Projects/React/rk-portfolio-website/node_modules/gatsby-cli/lib/reporter/reporter.js:214:34)
    at initializePlugin (/home/rishfilet/Projects/React/rk-portfolio-website/node_modules/gatsby-source-sanity/src/gatsby-node.ts:94:14)
    at Object.onPluginInit (/home/rishfilet/Projects/React/rk-portfolio-website/node_modules/gatsby-source-sanity/src/gatsby-node.ts:145:9)
    at runAPI (/home/rishfilet/Projects/React/rk-portfolio-website/node_modules/gatsby/src/utils/api-runner-node.js:462:22)
    at Promise.catch.decorateEvent.pluginName (/home/rishfilet/Projects/React/rk-portfolio-website/node_modules/gatsby/src/utils/api-runner-node.js:613:13)
    at Promise._execute (/home/rishfilet/Projects/React/rk-portfolio-website/node_modules/bluebird/js/release/debuggability.js:384:9)
    at Promise._resolveFromExecutor (/home/rishfilet/Projects/React/rk-portfolio-website/node_modules/bluebird/js/release/promise.js:518:18)
    at new Promise (/home/rishfilet/Projects/React/rk-portfolio-website/node_modules/bluebird/js/release/promise.js:103:10)
    at /home/rishfilet/Projects/React/rk-portfolio-website/node_modules/gatsby/src/utils/api-runner-node.js:611:16
    at tryCatcher (/home/rishfilet/Projects/React/rk-portfolio-website/node_modules/bluebird/js/release/util.js:16:23)
    at Object.gotValue (/home/rishfilet/Projects/React/rk-portfolio-website/node_modules/bluebird/js/release/reduce.js:166:18)
    at Object.gotAccum (/home/rishfilet/Projects/React/rk-portfolio-website/node_modules/bluebird/js/release/reduce.js:155:25)
Emitted 'error' event on process instance at:
    at processEmit [as emit] (/home/rishfilet/Projects/React/rk-portfolio-website/node_modules/signal-exit/index.js:199:34)
    at node:internal/child_process:725:35
    at processTicksAndRejections (node:internal/process/task_queues:78:11) {
  code: 'ERR_IPC_CHANNEL_CLOSED'
}
/home/rishfilet/Projects/React/rk-portfolio-website/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
        throw ex;
        ^

Error: Channel closed
    at new NodeError (node:internal/errors:371:5)
    at process.target.send (node:internal/child_process:721:16)
    at Object.sendMessage (/home/rishfilet/Projects/React/rk-portfolio-website/node_modules/gatsby-worker/dist/child.js:51:9)
    at Object.intentifiedActionCreators.<computed> [as createLog] (/home/rishfilet/Projects/React/rk-portfolio-website/node_modules/gatsby-cli/lib/reporter/reporter.js:343:9)
    at Object.info (/home/rishfilet/Projects/React/rk-portfolio-website/node_modules/gatsby-cli/lib/reporter/reporter.js:214:34)
    at initializePlugin (/home/rishfilet/Projects/React/rk-portfolio-website/node_modules/gatsby-source-sanity/src/gatsby-node.ts:94:14)
    at Object.onPluginInit (/home/rishfilet/Projects/React/rk-portfolio-website/node_modules/gatsby-source-sanity/src/gatsby-node.ts:145:9)
    at runAPI (/home/rishfilet/Projects/React/rk-portfolio-website/node_modules/gatsby/src/utils/api-runner-node.js:462:22)
    at Promise.catch.decorateEvent.pluginName (/home/rishfilet/Projects/React/rk-portfolio-website/node_modules/gatsby/src/utils/api-runner-node.js:613:13)
    at Promise._execute (/home/rishfilet/Projects/React/rk-portfolio-website/node_modules/bluebird/js/release/debuggability.js:384:9)
    at Promise._resolveFromExecutor (/home/rishfilet/Projects/React/rk-portfolio-website/node_modules/bluebird/js/release/promise.js:518:18)
    at new Promise (/home/rishfilet/Projects/React/rk-portfolio-website/node_modules/bluebird/js/release/promise.js:103:10)
    at /home/rishfilet/Projects/React/rk-portfolio-website/node_modules/gatsby/src/utils/api-runner-node.js:611:16
    at tryCatcher (/home/rishfilet/Projects/React/rk-portfolio-website/node_modules/bluebird/js/release/util.js:16:23)
    at Object.gotValue (/home/rishfilet/Projects/React/rk-portfolio-website/node_modules/bluebird/js/release/reduce.js:166:18)
    at Object.gotAccum (/home/rishfilet/Projects/React/rk-portfolio-website/node_modules/bluebird/js/release/reduce.js:155:25)
Emitted 'error' event on process instance at:
    at processEmit [as emit] (/home/rishfilet/Projects/React/rk-portfolio-website/node_modules/signal-exit/index.js:199:34)
    at node:internal/child_process:725:35
    at processTicksAndRejections (node:internal/process/task_queues:78:11) {
  code: 'ERR_IPC_CHANNEL_CLOSED'
}
/home/rishfilet/Projects/React/rk-portfolio-website/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
        throw ex;
        ^
rishFilet commented 2 years ago

Never mind, this was sovled because of my gatsby-config setup: { resolve: 'gatsby-plugin-manifest', options: { icon: 'src/images/icon.png', }, },

This path does not exist