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

[0.17.0] Error chmod-ing .bin files on 'yarn install' #1823

Closed
dbashford opened this issue Nov 14, 2016 · 21 comments · Fixed by #1867
Closed

[0.17.0] Error chmod-ing .bin files on 'yarn install' #1823

dbashford opened this issue Nov 14, 2016 · 21 comments · Fixed by #1867

Comments

@dbashford
Copy link

Do you want to request a feature or report a bug?
bug

What is the current behavior?
Running large install after updating to 0.17.0, yarn erroring out at random times in the build running chmod on .bin files. This works on 0.16.1

1st run

[3/4] 🔗 Linking dependencies...
error An unexpected error occurred: "ENOENT: no such file or directory, chmod 'PATH/project/node_modules/.bin/esparse'".

2nd run

[3/4] 🔗 Linking dependencies...
error An unexpected error occurred: "ENOENT: no such file or directory, chmod 'PATH/project/node_modules/.bin/rimraf'".

3rd run

[3/4] 🔗 Linking dependencies...
error An unexpected error occurred: "ENOENT: no such file or directory, chmod 'PATH/project/node_modules/.bin/rimraf'".

If the current behavior is a bug, please provide the steps to reproduce.

Just running yarn on large project after cleaning out all the node_modules.

What is the expected behavior?
Not erroring out

Please mention your node.js, yarn and operating system version.
v6.3.1
0.17.0
El Capitan

@dbashford dbashford changed the title [0.17.0] Error chmod-ing .bin files [0.17.0] Error chmod-ing .bin files on 'yarn install' Nov 14, 2016
@moliver-bb
Copy link

seeing the same issue on v0.17, was previously working on v0.16.1. Can post my error log if it helps. thanks!

@pmoleri
Copy link

pmoleri commented Nov 14, 2016

Same issue in Windows 10 using bash console. Also working ok in v0.16.1.

@sejoker
Copy link

sejoker commented Nov 14, 2016

same issue
Please mention your node.js, yarn and operating system version.
v4.6.0
0.17.0
ubuntu 16.04 LTS

@innoist
Copy link

innoist commented Nov 15, 2016

Same Issue
node: 7.1.0
yarn: 0.17.0
windows 10

working fine with 0.16.1

@joonki34
Copy link

Same Issue
node: 6.9.1
yarn: 0.17.0
windows 10

@jbruni
Copy link

jbruni commented Nov 15, 2016

Same Issue
node: 6.7.0
yarn: 0.17.0
Lubuntu 15.10 (Virtual Box guest, inside Windows 10 host)

@ingro
Copy link

ingro commented Nov 15, 2016

Same errore here:

node: 6.7.0
yarn: 0.17.0
windows 10

@bestander
Copy link
Member

We have chmod used only in one place in https://github.com/yarnpkg/yarn/blob/master/src/package-linker.js#L31, this did not change since 0.16.1

@joyfulelement
Copy link

We have also noticed the same issue with 0.17.0 reporting error An unexpected error occurred: "ENOENT: no such file or directory, chmod '/node_modules/.bin/semver'". with node version v5.3.0.

@bestander
Copy link
Member

I can't reproduce this.
Could anyone show a package.json where it happens?

@pmoleri
Copy link

pmoleri commented Nov 15, 2016

Hi @bestander ,

You can use this steps to reproduce the bug:

npm install -g yarn@0.17.0
git clone https://github.com/yarnpkg/yarn.git yarn-test
cd yarn-test
yarn install
yarn install v0.17.0
[1/4] Resolving packages...
[2/4] Fetching packages...
warning fsevents@1.0.14: The platform "win32" is incompatible with this module.
info "fsevents@1.0.14" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
error An unexpected error occurred: "ENOENT: no such file or directory, chmod 'C:\\Work\\repos\\yarn-test\\node_modules\\.bin\\mkdirp'".
info If you think this is a bug, please open a bug report with the information provided in "C:\\Work\\repos\\yarn-test\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

node: v6.9.1
OS: Windows 10 / bash

@dbashford
Copy link
Author

Could be related to #1863?

@bestander
Copy link
Member

@dbashford yeah, that could

@bestander
Copy link
Member

@pmoleri, I am on Mac and don't get an error like you but I get an unfinished install with a quick flash of error:

bestander-mbp:yarn-test bestander$ ~/work/yarn/artifacts/dist/bin/yarn
yarn install v0.18.0-0
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...
[1/2] ⠂ spawn-sync
[2/2] ⠂ fsevents
[-/2] ⠂ waiting...
✨  Done in 30.35s.

I am going to revert the change in #1210.
Can anyone check if applying this #1867 fixes the problem?

@pmoleri
Copy link

pmoleri commented Nov 15, 2016

It works.

I tried this:

cd yarn
git checkout v0.17.0
git checkout -b test-fix
npm run build
npm link
yarn -V
> 0.17.0

cd ../yarn-test
yarn install
> error An unexpected error occurred: "ENOENT: no such file or directory, chmod 'C:\\repos\\yarn-test\\node_modules\\.bin\\mkdirp'".

cd ../yarn
git pull https://github.com/bestander/yarn.git fix-nested-bins
npm run build

cd ../yarn-test
yarn install
> Done in 34.47s.

@bestander
Copy link
Member

Ok, I'll merge it and make a 0.17.1 in a couple of hours

On Tue, 15 Nov 2016 at 20:07, pmoleri notifications@github.com wrote:

It works.

I tried this:

cd yarn
git checkout v0.17.0
git checkout -v test-fix
npm run build
npm link
yarn -V

0.17.0

cd ../yarn-test
yarn install

error An unexpected error occurred: "ENOENT: no such file or directory, chmod 'C:\repos\yarn-test\node_modules.bin\mkdirp'".

cd ../yarn
git pull https://github.com/bestander/yarn.git fix-nested-bins
npm run build

cd ../yarn-test
yarn install

Done in 34.47s.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1823 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACBdWLBxdphWMslaU7pXqBMQrqypqM9Iks5q-hDogaJpZM4KxuOp
.

@pmoleri
Copy link

pmoleri commented Nov 16, 2016

Verified, working fine in v0.17.2

@webia1
Copy link

webia1 commented Nov 30, 2016

today same error with:

Yarn version:
0.17.9

Node version:
6.8.1

Platform:
win32 x64

@francisoud
Copy link

francisoud commented Mar 27, 2017

Same error with:

  • Yarn version: 0.21.3
  • Node version: 6.9.1
  • Platform: win32 x64

I uploaded yarn-error-1823.log in a gist so you can get full log/package.json content...

Running it again, it pass...

@gkaran
Copy link

gkaran commented Jun 22, 2017

Having the same problem with @francisoud and have tried both 0.22.0 and 0.26.1

  • Yarn version: 0.22.0 or 0.26.1
  • Node version: 7.0.0
  • Platform: win32 x64

Some builds pass while most fail.

@MathieuDoyon
Copy link

Same here after I ran yarn cache clean

  • Yarn version : 0.21.3
  • Node version: 8.1.2
  • Platform: macOS Sierra 10.12.5

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 a pull request may close this issue.