-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 npm_execpath for bundled release #2843
Conversation
Awesome, another issue with bundled build fixed! |
@bestander Thank you! |
The trick with node-gyp is that we don't bundle it with the yarn.js build. See discussions and workarounds: The workaround to make Yarn install node-gyp and then yarn.js be able to access it. |
This reverts commit 2f49dcf.
@bestander Yes, I see.
It will cause an error:
Maybe this code causes the error or I'm wrong?
|
I may made a mistake.
Why? |
Are you sure you do `yarn global add yarn`?
…On 9 March 2017 at 06:00, HOU Bin ***@***.***> wrote:
I may made a mistake.
This one works:
docker run --rm -it node:7.7 /bin/bash -c "yarn global add yarn && echo \"env\" >> /root/.config/yarn/global/node_modules/yarn/bin/node-gyp-bin/node-gyp && yarn add webworker-threads"
Why?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2843 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACBdWGS4TKmZHGuqyDjIDIjamOCpdPxbks5rj5V_gaJpZM4MT5zY>
.
|
Yes,
|
I haven't followed the log through yet but I would advise against |
@bestander It's easy to confirm what yarn binary is used.
The default yarn is a bundled yarn binary, and then
Common yarn overrides pre-installed version. We can also confirm the version, and install webworker-threads again.
|
Summary
Docker is using a bundled version of yarn, and the
yarn.js
is moved to/usr/local/bin/yarn
.However yarn always generates
npm_execpath
by the following code:Then the generated
npm_execpath
with docker pre-installed yarn will be/bin/yarn.js
which does not exist.Test plan
Test 1: Bundled version:
Run:
Output:
Test 2: Common installed version:
Output:
#fix #2345