gatsby-plugin-manifest npm install sharp not working

Created on 16 Sep 2019  Â·  10Comments  Â·  Source: gatsbyjs/gatsby

I tried to install this plugin following the tutorial:
npm install --save gatsby-plugin-manifest

the install doesn't throw any errors but once I try building I get back.

Something went wrong installing the "sharp" module

Tried multiple times deleting node-modules, reinstalling, reinstalling sharp, etc. Nothing works
Other plugins have worked without any problems.
Thanks for any help

stale? question or discussion

All 10 comments

17558 did you checked this?

You typically wouldn't (re-)install sharp but node-gyp. Have you followed the instructions here? https://github.com/nodejs/node-gyp

Hi, I have been following the tutorial at add-a-manifest-file on the official gatsby site but I have been experienced issues with the gatsby-plugin-manifest plugin.

error I am facing

Every time I run gatsby build or gatsby develop the error I get is:

/usr/bin/node /usr/share/yarn/bin/yarn.js run build
yarn run v1.17.3
$ gatsby build
success open and validate gatsby-configs - 0.021 s

 ERROR 


Something went wrong installing the "sharp" module

Module did not self-register.

- Remove the "node_modules/sharp" directory, run "npm install" and look for errors
- Consult the installation documentation at https://sharp.pixelplumbing.com/en/stable/install/
- Search for this error at https://github.com/lovell/sharp/issues


â ‹ load plugins
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Process finished with exit code 1

This happens after the yarn add gatsby-plugin-manifest ran successfully.

what I have tried

  1. I have deleted the yarn.lock file and the node_modules folder. Then ran yarn on the terminal without any issues.
  2. I have also checked that the version of the "gatsby-plugin-manifest": "^2.2.20", in the package.json
  3. I have tried running yarn why sharp and the result is as follows:
info Reasons this module exists
   - "gatsby-plugin-manifest" depends on it
   - Hoisted from "gatsby-plugin-manifest#sharp"

Thanks for taking your time to look at this.

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.

If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

Hey again!

It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it.

Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to reopen this issue or create a new one if you need anything else.

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks again for being part of the Gatsby community!

The issue is still occurring

node: symbol lookup error: /opt/build/repo/node_modules/gatsby-plugin-manifest/node_modules/sharp/build/Release/sharp.node: undefined symbol: _ZNK4vips6VImage13icc_transformEPKcPNS_7VOptionE

One reason might be that there are binaries being used that get explicitly compiled against node versions. This binary gets cached and seems to be unaware of node versions changing, like one might do with nvm, or after an upgrade.

If you get hit by this it might be worth to remove the node cache (~/.npm/_cacache) and node_modules, then running npm install again. I think the important bit is that you see the following steps somewhere while installing (this is explicit for my linux machine, on node 8). Important to note is that it downloads the libvips once or twice, and not always fetching it from cache.

 > [email protected] install node_modules/gatsby-plugin-manifest/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)

info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.8.1/libvips-8.8.1-linux-x64.tar.gz

> [email protected] install node_modules/gatsby-plugin-sharp/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)

info sharp Using cached ~/.npm/_libvips/libvips-8.8.1-linux-x64.tar.gz

> [email protected] install node_modules/gatsby-transformer-sharp/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)

info sharp Using cached ~/.npm/_libvips/libvips-8.8.1-linux-x64.tar.gz

> [email protected] install node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)

info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.7.4/libvips-8.7.4-linux-x64.tar.gz

I encountered tihs today as well and can confirm this fixed it for me (I removed all of ./.npm but that was probably overkill and removed some settings) and works on node 8.

thanks for the hints for removing also the npm cache
yes i also use nvm

Was this page helpful?
0 / 5 - 0 ratings