This builds just fine locally both in gatsby develop and gatsby build.
But once it pulls from my git repo (and runs on Netlify), it throws this.
Gatsby 1.9.118
6:44:23 PM: error UNHANDLED EXCEPTION
6:44:23 PM:
6:44:23 PM: Error: Cannot find module 'gatsby-cli/lib/reporter'
6:44:23 PM:
6:44:23 PM: - v8-compile-cache.js:159 require
6:44:23 PM: [repo]/[v8-compile-cache]/v8-compile-cache.js:159:20
6:44:23 PM:
6:44:23 PM: - index.js:574 Object.
6:44:23 PM: [repo]/[gatsby-plugin-sharp]/index.js:574:14
6:44:23 PM:
6:44:23 PM: - v8-compile-cache.js:178 Module._compile
6:44:23 PM: [repo]/[v8-compile-cache]/v8-compile-cache.js:178:30
6:44:23 PM:
6:44:23 PM: - v8-compile-cache.js:159 require
6:44:23 PM: [repo]/[v8-compile-cache]/v8-compile-cache.js:159:20
6:44:23 PM:
6:44:23 PM: - extend-node-type.js:28 Object.
6:44:23 PM: [repo]/[gatsby-transformer-sharp]/extend-node-type.js:28:17
6:44:23 PM:
6:44:23 PM: - v8-compile-cache.js:178 Module._compile
6:44:23 PM: [repo]/[v8-compile-cache]/v8-compile-cache.js:178:30
Is there any way I can dig into the actual unhandled error?
I think @pieh is working on a fix for this. As a temporary workaround adding gatsby-cli to your project (not globally) should fix it.
For me, it's failing on both develop and build. It's started happening after I updated some packages, but reverting back to the previous version doesn't seem to fix the issue.
Fix is ready for review https://github.com/gatsbyjs/gatsby/pull/4122
@jonavila gatsby-remark-images depends on bugged gatsby-plugin-sharp so downgrading gatsby-plugin-sharp in your project won't fix this if you use gatsby-remark-images unfortunately. Try using workaround provided by @m-allanson for now.
Many thanks!! the @m-allanson solution works for me. ;)
Fixed with #4122 . Update gatsby-plugin-sharp to 1.6.31 and gatsby-remark-images (if used) to 1.5.47
Most helpful comment
I think @pieh is working on a fix for this. As a temporary workaround adding
gatsby-clito your project (not globally) should fix it.