-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add global node-gyp for yarn #381
Conversation
I feel like the proper fix is for packages to include |
@Daniel15 Isn't yarn intended as a drop-in replacement for npm? Then it's compulsory for node-gyp to be available out of the box: https://github.com/nodejs/node-gyp/wiki/Updating-npm's-bundled-node-gyp
|
Yes, this should be fixed in the next Yarn release. For now I think it's totally fine to I still think packages that depend on node-gyp should make that explicit rather than having the implicit dependency. |
While you are still figuring out yarnpkg/yarn#3114, I think we should unbreak the Docker image. |
I agree on unbreaking the image, but it's fixed in yarn now, just need to wait on a release. Hopefully really soon 😄 yarnpkg/yarn#3240 |
It should be fine if you specify it as a dependency - both npm and Yarn add
the ./node_modules/.bin directory to the process' PATH.
Sent from my phone.
…On Apr 26, 2017 3:01 AM, "Vlad Wing" ***@***.***> wrote:
Even if a package would add node-gyp as their dependency, yarn would
still have trouble finding the executable node-gyp in the $PATH. The
error is something like this: ```sh: node-gyp: not found````
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#381 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAFnHW0pRL_Mibyxxkn1Ni3C5mI65n18ks5rzxXqgaJpZM4M8RkN>
.
|
@Daniel15: I tested that with the alpine tag, and it doesn't work. Dockerfile:
package.json:
Command:
Error:
Adding a PS. I tested with other versions of node:alpine as well, but I want to keep the version locked for this bug report. |
@vladwing - The issue is that |
@teohhanhui I am eager for this fix to be included in images that will not get the version of yarn with this fix. Is there any reason this PR is stalled? Anything I can help with to get it moving along? |
So if we add Has there been discussion on an official yarn image? Having and image tagged to a given yarn version would certainly help here. |
The images should already have node-gyp given npm comes bundled with a version of it. Adding npm's version to the Upcoming Yarn releases have fixed this issue by using npm's version of node-gyp if available. |
Fixes #346
See yarnpkg/yarn#2266