Skip to content

[Bug] Berry fails to install itself due to sharp package build #172

@olingern

Description

@olingern

Describe the bug

When installing berry dependencies from the root directory, installation fails due to node-gyp build issue.

Removing the gatsby package.json allows the build to finish for me. Not sure what package is using sharper. I took a guess and removed gatsby-transformer-sharp, but the build issue persists.

Running yarn why sharper also hangs indefinitely for me in the repository. Current nightly works as expected in projects with symlinked node_modules installed via yarn v1.x.x / npm. I'll open a separate issue if someone can confirm.

image

Log output:

# This file contains the result of Berry building a package (sharp@npm:0.21.3)

info sharp Using cached /home/olingern/.npm/_libvips/libvips-8.7.0-linux-x64.tar.gz
(node:8947) ExperimentalWarning: The fs.promises API is experimental
(node:8978) ExperimentalWarning: The fs.promises API is experimental
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@10.1.0 | linux | x64
(node:8997) ExperimentalWarning: The fs.promises API is experimental
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/home/olingern/code/berry/.yarn/unplugged/node-gyp-npm-3.8.0-8f62f4346137bf0043db31ef1d9cfacb368b52800dda250d652445f0308ebef7/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/olingern/code/berry/.yarn/unplugged/sharp-npm-0.21.3-70100537f349f4285924b9143813ff30cacd20d0556b34e835aa8dbe7189a20d/node_modules/sharp/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/olingern/code/berry/.yarn/unplugged/node-gyp-npm-3.8.0-8f62f4346137bf0043db31ef1d9cfacb368b52800dda250d652445f0308ebef7/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/olingern/.node-gyp/10.1.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/olingern/.node-gyp/10.1.0',
gyp info spawn args   '-Dnode_gyp_dir=/home/olingern/code/berry/.yarn/unplugged/node-gyp-npm-3.8.0-8f62f4346137bf0043db31ef1d9cfacb368b52800dda250d652445f0308ebef7/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/olingern/.node-gyp/10.1.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/olingern/code/berry/.yarn/unplugged/sharp-npm-0.21.3-70100537f349f4285924b9143813ff30cacd20d0556b34e835aa8dbe7189a20d/node_modules/sharp',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
(node:9011) ExperimentalWarning: The fs.promises API is experimental
gyp: Call to 'node -e "console.log(require('./lib/libvips').pkgConfigPath())"' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/home/olingern/code/berry/.yarn/unplugged/node-gyp-npm-3.8.0-8f62f4346137bf0043db31ef1d9cfacb368b52800dda250d652445f0308ebef7/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:235:12)
gyp ERR! System Linux 4.15.0-48-generic
gyp ERR! command "/home/olingern/.nvm/versions/node/v10.1.0/bin/node" "/home/olingern/code/berry/.yarn/unplugged/node-gyp-npm-3.8.0-8f62f4346137bf0043db31ef1d9cfacb368b52800dda250d652445f0308ebef7/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/olingern/code/berry/.yarn/unplugged/sharp-npm-0.21.3-70100537f349f4285924b9143813ff30cacd20d0556b34e835aa8dbe7189a20d/node_modules/sharp
gyp ERR! node -v v10.1.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 

To Reproduce

  • Navigate to root of berry project
  • Run yarn

Environment if relevant (please complete the following information):

OS: Ubuntu 18.04.2 LTS
Node version: 10.1.0
Yarn version: v2.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions