Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: update to node-gyp@9.1.0 #4812

Merged
merged 1 commit into from
Sep 3, 2022
Merged

Conversation

amitdahan
Copy link
Contributor

What's the problem this PR addresses?

After cloning berry and trying to yarn, on my particular setup (my guess would be python-CLI related) I got an error while postinstalling sharp:

build.log
# This file contains the result of Yarn building a package (sharp@npm:0.28.3)
# Script name: install

sharp: Detected globally-installed libvips v8.13.0
sharp: Building from source via node-gyp
gyp info it worked if it ends with ok
gyp info using node-gyp@6.0.1
gyp info using node@16.15.0 | darwin | arm64
gyp info find Python using Python version 3.10.6 found at "/opt/homebrew/opt/python@3.10/bin/python3.10"
(node:38886) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use `node --trace-deprecation ...` to show where the warning was created)
gyp info spawn /opt/homebrew/opt/python@3.10/bin/python3.10
gyp info spawn args [
gyp info spawn args   '/Users/amitda/dev/berry2/.yarn/unplugged/node-gyp-npm-6.0.1-a5d9899eb8/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   '/Users/amitda/dev/berry2/.yarn/unplugged/sharp-npm-0.28.3-0b2c15610d/node_modules/sharp/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/amitda/dev/berry2/.yarn/unplugged/node-gyp-npm-6.0.1-a5d9899eb8/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/amitda/Library/Caches/node-gyp/16.15.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=/Users/amitda/Library/Caches/node-gyp/16.15.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/amitda/dev/berry2/.yarn/unplugged/node-gyp-npm-6.0.1-a5d9899eb8/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/amitda/Library/Caches/node-gyp/16.15.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/amitda/dev/berry2/.yarn/unplugged/sharp-npm-0.28.3-0b2c15610d/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=.'
gyp info spawn args ]
Traceback (most recent call last):
File "/Users/amitda/dev/berry2/.yarn/unplugged/node-gyp-npm-6.0.1-a5d9899eb8/node_modules/node-gyp/gyp/gyp_main.py", line 47, in <module>
  import gyp
File "/Users/amitda/dev/berry2/.yarn/unplugged/node-gyp-npm-6.0.1-a5d9899eb8/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 10, in <module>
  import gyp.input
File "/Users/amitda/dev/berry2/.yarn/unplugged/node-gyp-npm-6.0.1-a5d9899eb8/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 9, in <module>
  import gyp.common
File "/Users/amitda/dev/berry2/.yarn/unplugged/node-gyp-npm-6.0.1-a5d9899eb8/node_modules/node-gyp/gyp/pylib/gyp/common.py", line 499, in <module>
  class OrderedSet(collections.MutableSet):
AttributeError: module 'collections' has no attribute 'MutableSet'
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/amitda/dev/berry2/.yarn/unplugged/node-gyp-npm-6.0.1-a5d9899eb8/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Darwin 22.1.0
gyp ERR! command "/Users/amitda/.fnm/node-versions/v16.15.0/installation/bin/node" "/Users/amitda/dev/berry2/.yarn/unplugged/node-gyp-npm-6.0.1-a5d9899eb8/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/amitda/dev/berry2/.yarn/unplugged/sharp-npm-0.28.3-0b2c15610d/node_modules/sharp
gyp ERR! node -v v16.15.0
gyp ERR! node-gyp -v v6.0.1
gyp ERR! not ok 

How did you fix it?

I noticed node-gyp being 3 majors behind and indeed after bumping it to true latest installation finished with no errors.

(I believe the fix was actually just 1 minor forward in 6.1.0 - nodejs/node-gyp@04da736)

Checklist

  • I have read the Contributing Guide.
  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@merceyz merceyz changed the title Bump node-gyp@6.0.1 -> node-gyp@9.1.0 deps: update to node-gyp@9.1.0 Sep 3, 2022
@amitdahan amitdahan marked this pull request as ready for review September 3, 2022 14:41
@arcanis arcanis merged commit cdc75c3 into yarnpkg:master Sep 3, 2022
@amitdahan amitdahan deleted the bump-node-gyp branch September 4, 2022 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants