When I just wanted to deploy my site (based on gatsby-starter-blog) to Netlify the build broke with the following error:
5:52:32 PM: node: symbol lookup error: /opt/build/repo/node_modules/gatsby-plugin-manifest/node_modules/sharp/build/Release/sharp.node: undefined symbol: _ZNK4vips6VImage11premultiplyEPNS_7VOptionE
So I ran gatsy build
locally and got this:
```
Error: dlopen(/path/to/node_modules/gatsby-plugin-manifest/node_module s/sharp/build/Release/sharp.node, 1): Library not loaded: @rpath/libvips.42.dylib
Referenced from: /path/to/node_modules/gatsby-plugin-manifest/node_m odules/sharp/vendor/lib/libvips-cpp.42.dylib
Reason: Incompatible library version: libvips-cpp.dylib requires version 52.0.0 or later, but li bvips.42.dylib provides version 51.0.0
Seems to be the latest version of the manifest plugin. Downgrading and locking it to version 2.0.5 in my package.json fixed the issue for me.
### Steps to reproduce
Use current version of manifest plugin and run `gatsy build`.
### Expected result
Build should be successful.
### Actual result
Build breaks.
### Environment
(this shows the manifest plugin being locked to version 2.0.5 which is not the one causing the issue as mentioned above)
System:
OS: macOS High Sierra 10.13.6
CPU: x64 Intel(R) Core(TM) i5-4288U CPU @ 2.60GHz
Shell: 5.3 - /bin/zsh
Binaries:
Node: 8.11.1 - ~/.nodenv/versions/8.11.1/bin/node
Yarn: 1.9.4 - /usr/local/bin/yarn
npm: 5.6.0 - ~/.nodenv/versions/8.11.1/bin/npm
Browsers:
Chrome: 69.0.3497.100
Firefox: 60.0
Safari: 12.0
npmPackages:
gatsby: ^2.0.0 => 2.0.7
gatsby-plugin-canonical-urls: ^2.0.4 => 2.0.6
gatsby-plugin-feed: ^2.0.5 => 2.0.5
gatsby-plugin-google-analytics: ^2.0.5 => 2.0.6
gatsby-plugin-manifest: 2.0.5 => 2.0.5
gatsby-plugin-offline: ^2.0.5 => 2.0.5
gatsby-plugin-react-helmet: ^3.0.0 => 3.0.0
gatsby-plugin-sharp: ^2.0.5 => 2.0.5
gatsby-plugin-styled-components: ^3.0.0 => 3.0.0
gatsby-remark-copy-linked-files: ^2.0.5 => 2.0.5
gatsby-remark-images: ^2.0.1 => 2.0.1
gatsby-remark-prismjs: ^3.0.2 => 3.0.2
gatsby-remark-responsive-iframe: ^2.0.5 => 2.0.5
gatsby-remark-smartypants: ^2.0.5 => 2.0.5
gatsby-source-filesystem: ^2.0.1 => 2.0.1
gatsby-transformer-remark: ^2.1.9 => 2.1.9
gatsby-transformer-sharp: ^2.1.1 => 2.1.1
npmGlobalPackages:
gatsby-cli: 2.4.2
```
@codejet can you try updating to gatsby-plugin-manifest
to version 2.0.7
and check if it solves the issue for you?
thanks @kakadiadarpan. i just tried with 2.0.7 but am still getting the same error (locally).
@codejet can you also try updating other gatsby dependencies?
My environment info looks like this and everything is working fine:
System:
OS: macOS 10.14
CPU: x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Shell: 5.3 - /bin/zsh
Binaries:
Node: 10.9.0 - /usr/local/bin/node
Yarn: 1.9.4 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Browsers:
Chrome: 70.0.3538.77
Firefox: 62.0.3
Safari: 12.0
npmPackages:
gatsby: ^2.0.19 => 2.0.34
gatsby-image: ^2.0.15 => 2.0.18
gatsby-plugin-manifest: ^2.0.5 => 2.0.7
gatsby-plugin-offline: ^2.0.5 => 2.0.10
gatsby-plugin-react-helmet: ^3.0.0 => 3.0.1
gatsby-plugin-sharp: ^2.0.7 => 2.0.10
gatsby-source-filesystem: ^2.0.4 => 2.0.6
gatsby-transformer-sharp: ^2.1.4 => 2.1.7
npmGlobalPackages:
gatsby-cli: 2.4.4
@codejet If that doesn't work, could you share a reproduction repo for us to take a look at?
@kakadiadarpan will try tonight when i'm back home
Same issue here. Did anyone fix it?
System:
OS: macOS High Sierra 10.13.6
CPU: x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Shell: 5.3 - /bin/zsh
Binaries:
Node: 8.11.3 - /usr/local/bin/node
npm: 5.6.0 - /usr/local/bin/npm
Browsers:
Chrome: 69.0.3497.100
Firefox: 52.9.0
Safari: 12.0
npmPackages:
gatsby: 2.0.10 => 2.0.10
gatsby-image: ^2.0.13 => 2.0.13
gatsby-plugin-google-analytics: ^2.0.6 => 2.0.6
gatsby-plugin-manifest: ^2.0.7 => 2.0.7
gatsby-plugin-offline: ^2.0.9 => 2.0.9
gatsby-plugin-postcss: ^2.0.0 => 2.0.0
gatsby-plugin-react-helmet: ^3.0.0 => 3.0.0
gatsby-plugin-sass: ^2.0.1 => 2.0.1
gatsby-plugin-sharp: ^2.0.6 => 2.0.6
gatsby-plugin-sitemap: ^2.0.1 => 2.0.1
gatsby-remark-component: ^1.1.3 => 1.1.3
gatsby-remark-copy-linked-files: ^2.0.5 => 2.0.5
gatsby-remark-images: ^2.0.4 => 2.0.4
gatsby-remark-prismjs: ^3.0.0 => 3.0.1
gatsby-remark-responsive-iframe: ^2.0.5 => 2.0.5
gatsby-remark-smartypants: ^2.0.5 => 2.0.5
gatsby-source-filesystem: ^2.0.1 => 2.0.2
gatsby-source-thirdparty: ^1.0.6 => 1.0.6
gatsby-transformer-remark: ^2.1.5 => 2.1.6
gatsby-transformer-sharp: ^2.1.3 => 2.1.3
npmGlobalPackages:
gatsby-cli: 2.4.1
When running yarn upgrade
I also get an error which mentions libvips:
error /path/to/node_modules/sharp: Command failed.
Exit code: 1
Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
Arguments:
Directory: /path/to/node_modules/sharp
Output:
ERR! sharp Found vendored libvips v8.6.1 but require v8.7.0. Please remove the 'node_modules/sharp/vendor' directory and run 'npm install'.
ERR! sharp Please see http://sharp.pixelplumbing.com/page/install
OK, yarn upgrade --latest
did the trick. Build runs through locally and on Netlify (there I had to run it twice and clear the cache though).
@ThiagoMiranda updating Gatsby and it's plugins resolved the issue for @codejet. Can you do the same?
btw: thanks again @kakadiadarpan 馃檱
Closing, since I just confirmed on my end that updating Gatsby and its plugins resolves this issue.
Feel free to reopen if that fix doesn't work for you.
this issue im have been solved by just update these latest gatsby-plugin-manifest
and remove .cache
and node_modules
Still facing this issue on 2.2.26
Confirmed, this is happening on version 2.2.26
. Does not happen locally, but on circleci. Not able to reproduce locally. Happens during gatsby build
. Error from ci logs
node: symbol lookup error: /root/project/node_modules/gatsby-plugin-manifest/node_modules/sharp/build/Release/sharp.node: undefined symbol: _ZNK4vips6VImage7pngsaveEPKcPNS_7VOptionE
error Command failed with exit code 127.
Please update your dependencies as mentioned here or here: https://github.com/gatsbyjs/gatsby/issues/19103
I run
yarn add gatsby-transformer-sharp gatsby-plugin-offline gatsby-plugin-manifest gatsby-plugin-sharp
and Netlify stop throwing an error
I am using Netlify to deploy my gatsby site. I had to use newer Node version on Netlify.
You add new .nvmrc file in your project root and write node version.
Most helpful comment
OK,
yarn upgrade --latest
did the trick. Build runs through locally and on Netlify (there I had to run it twice and clear the cache though).