What is the output of running npx envinfo --binaries --languages --system --utilities?
System:
OS: macOS Mojave 10.14.6
CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
Memory: 941.34 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.12.0 - /usr/local/bin/node
Yarn: 1.19.1 - /usr/local/bin/yarn
npm: 6.12.0 - /usr/local/bin/npm
Utilities:
Make: 3.81 - /usr/bin/make
GCC: 10.14. - /usr/bin/gcc
Git: 2.20.1 - /usr/bin/git
Clang: 1001.0.46.4 - /usr/bin/clang
Subversion: 1.10.3 - /usr/bin/svn
Languages:
Bash: 3.2.57 - /bin/bash
Perl: 5.18.4 - /usr/bin/perl
PHP: 7.1.23 - /usr/bin/php
Python: 2.7.10 - /usr/bin/python
Ruby: 2.3.7 - /usr/bin/ruby
What are the steps to reproduce?
Upload an existing Gatsby site to Gatsby cloud hosting and will reproduce the error.
What is the expected behaviour?
keep getting the same message on the build. Not even one successful build so far yet.
Are you able to provide a standalone code sample, without other dependencies, that demonstrates this problem?
Maybe
Are you able to provide a sample image that helps explain the problem?
Yes

Hi, please can you answer the following questions from the installation issue template - https://github.com/lovell/sharp/issues/new?labels=installation&template=installation.md
npm install is the same as the platform and version of Node.js used at runtime?root or sudo user, have you tried with the npm install --unsafe-perm flag?ignore-scripts feature of npm, have you tried with the npm install --ignore-scripts=false flag?npm install --verbose sharp? Have you checked this output for useful error messages?I follow the documentation and have tried all the bullet lists. When I run --verbose sharp not getting any error messages. Running in local build doing fine just when deploy to Gatsby host cloud getting the sharp module did not self-register error.
@lovell forgot to mention both running on v12.12.0 node.js
I'm had the same problem. I have tried running cordova-res when I get the error. Strange thing is I get this error when sharp is installed and not installed. My guess is that something is off possibly on the cordova-res end. I got it working when I updated cordova-res
I'm had the same problem. I have tried running cordova-res when I get the error. Strange thing is I get this error when sharp is installed and not installed. My guess is that something is off possibly on the cordova-res end. I got it working when I updated cordova-res
I fixed mine actually. Make sure you have latest sharp plugin and Gatsby version. Under your package.json delete "node.js" and run with yarn.
Most helpful comment
I follow the documentation and have tried all the bullet lists. When I run --verbose sharp not getting any error messages. Running in local build doing fine just when deploy to Gatsby host cloud getting the sharp module did not self-register error.