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

Does not use globally installed node-gyp #1016

Closed
jeffrson opened this issue Feb 29, 2020 · 1 comment
Closed

Does not use globally installed node-gyp #1016

jeffrson opened this issue Feb 29, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@jeffrson
Copy link

Describe the bug

I'm trying to install "argon2" (yarn add argon2) with node 13.9.0 - there's no prebuilt binary yet, so it needs to be built.

First there is a YN0032 warning - I've read https://yarnpkg.com/advanced/error-codes#yn0032---node_gyp_injected and I could fix the issue by yarn add node-gyp. I thought about reporting a bug against argon2 - such that the should need to declare a peerDependency or dependency.

However, I was wondering why yarn does not use the node-gyp version I had installed previously by npm i -g node-gyp.

Should it use an existing node-gyp (like yarn1 does)?

@jeffrson jeffrson added the bug Something isn't working label Feb 29, 2020
@arcanis
Copy link
Member

arcanis commented Mar 2, 2020

However, I was wondering why yarn does not use the node-gyp version I had installed previously by npm i -g node-gyp.

Because Yarn aims to provide reproducible builds, and relying on global binaries would necessarily goes against this goal (you'd have a different node-gyp version from one install to another, causing different issues to appear).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants