Sharp: Something went wrong installing the "sharp" module Module did not self-register.

Created on 27 Jan 2020  路  5Comments  路  Source: lovell/sharp

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
Screen Shot 2020-01-27 at 1 04 14 PM

installation

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.

All 5 comments

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

  • Did you see the documentation relating to installation?
  • Have you ensured the platform and version of Node.js used for npm install is the same as the platform and version of Node.js used at runtime?
  • If you are installing as a root or sudo user, have you tried with the npm install --unsafe-perm flag?
  • If you are using the ignore-scripts feature of npm, have you tried with the npm install --ignore-scripts=false flag?
  • What is the complete output of running 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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

henbenla picture henbenla  路  3Comments

sansroman picture sansroman  路  3Comments

paulieo10 picture paulieo10  路  3Comments

natural-law picture natural-law  路  3Comments

zilions picture zilions  路  3Comments