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

fix: yarn fails under node 16.17.x #506

Closed
wants to merge 1 commit into from
Closed

fix: yarn fails under node 16.17.x #506

wants to merge 1 commit into from

Conversation

strophy
Copy link
Collaborator

@strophy strophy commented Aug 24, 2022

Issue being fixed or feature implemented

yarn 3.1.0 under Node 16.17.0 LTS was failing with:

(node:61745) ExperimentalWarning: Custom ESM Loaders is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
gyp: Call to 'node -e "require('nan')"' 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/strophy/Code/dashevo/platform/.yarn/unplugged/node-gyp-npm-8.4.0-ee07b38f64/node_modules/node-gyp/lib/configure.js:259:16)
gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Linux 5.15.0-46-generic
gyp ERR! command "/home/strophy/.nvm/versions/node/v16.17.0/bin/node" "/home/strophy/Code/dashevo/platform/.yarn/unplugged/node-gyp-npm-8.4.0-ee07b38f64/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/strophy/Code/dashevo/platform/.yarn/unplugged/cpu-features-npm-0.0.2-b27e7998ec/node_modules/cpu-features
gyp ERR! node -v v16.17.0
gyp ERR! node-gyp -v v8.4.0
gyp ERR! not ok 

This was due to yarn 3 relying on experimental custom ESM loaders, which can have breaking changes in minor versions. The issue was discussed and resolved here.

What was done?

This PR updates yarn to a version 3.2.2, which supports the changes to ESM loaders in Node 16.17.x (and Node 18.x)

How Has This Been Tested?

Locally

Breaking Changes

None

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@strophy strophy added this to the v0.23.0 milestone Aug 24, 2022
@lgtm-com
Copy link

lgtm-com bot commented Aug 24, 2022

This pull request introduces 12 alerts and fixes 21 when merging ceb9e76 into 4e90768 - view on LGTM.com

new alerts:

  • 10 for Expression has no effect
  • 1 for Useless assignment to local variable
  • 1 for Unneeded defensive code

fixed alerts:

  • 13 for Unused variable, import, function or class
  • 7 for Useless assignment to local variable
  • 1 for Useless conditional

@shumkov
Copy link
Member

shumkov commented Aug 24, 2022

Unfortunately, we fixed it simultaniusly but there are additional fixes in #507. Pleases review

@shumkov shumkov closed this Aug 24, 2022
@shumkov shumkov deleted the update-yarn branch September 30, 2022 11:43
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