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
Lerna bootstrap fails due to concurrency (with npm) #789
Comments
@Reinmar Thanks for the repro case! |
Interesting, I ran into this issue a while back and was getting very consistent failures. Tried playing with various combinations of yarn, lerna and node to see why this was happening. Tried it again today and was seeing the same issue, but cleaned my yarn cache and suddenly everything is working
|
I got a bit different error today, but from what I checked it's also related to concurrency: https://gist.github.com/Reinmar/b9978b60d09fec1ffc9f55f8d1262349 (this is |
@Reinmar That error seems to indicate there is invalid JSON in the package.json file? Did the |
Unfortunately, I didn't save it as I went straight to I know that the npm log indicates that some JSON was missing/invalid, but I've seen the same error many times in the past. Usually, a second
And why does it work when running Anyhow reasonable? |
That sounds very reasonable. Definitely worthy of further investigation. |
Do you think it would be fruitful to make an integration test that demonstrates this behavior? |
That would definitely be a part of the fix. |
I wonder if npm 5 will solve this issue:
And there's the whole cache rewrite too. |
nope. npm5 does not. |
We've been able to solve this issue by setting
where scripts frontend is
and scripts extension is
|
having the same issue :
Tried even npm : v5.8.0 |
We finally have a reliable workaround!!!
where the makefile does
The key is |
Same issue when run command |
Experiencing this as well. I read that |
In our case I narrowed the bug down to npm version 6.10.2. I can successfully run 6.10.1 with concurrency=8, whereas using 6.10.2 it fails every time. Looking at the changelog there were changes in this version to cache file ownership, so this sounds likely. We're using node 12.13.0, although I'm not sure this is relevant. (To be clear, I'm referring to the cache lock issue, e.g. ENOENT: no such file or directory, lchown '/Users/xxx/.npm/_locks/staging-5e1c07f26fab6251.lock') |
@plastictoast Great. It's seems the issue is caused by shared cache. Disable npm cache works fine, I find this workaround. |
We had this issue at times years ago, but hadn' in a long time. Started having it again every 2nd or 3rd build after we updated our Node.js and npm versions. npm from various In our case, we can't use With 60 packages, our bootstraps need all the help they can get, so disabling concurrency is a perceptible difference 🤕. Nervous that it sound like the issues goes back to npm |
Hi I have a 200+ sub modules project using lerna. here if I call: if I call: The first bootstrap call will create the symlink but the npm call will overwrite them. if I call: my node_modules will be populate with copy of the files so... is there a wait to provide an think of a single call to |
Recently tried enabling |
On some occasions npm complains with a message like: enoent ENOENT: no such file or directory, lchown '/tmp/tuleap_build/.npm/_locks/staging-78bb044783b6a338.lock' The issue seems to be known [0], so to avoid let's completly disable the concurrency when bootstraping the packages. Close request #13753: Use Lerna to install the JS dependencies of all Tuleap components [0] lerna/lerna#789 Change-Id: I4d42a8eaeab2362424e4b00974668fa89a4273eb
Has any consideration been given to fixing this problem by implementing a retry on the npm installs? I ran into a variation of this issue, a problem where an npm installs failed while running lerna bootstrap, which was resolved by setting parallelism setting to one. Only logging I got was a stack trace (no error message) pointing back to the execa library. I patched in some additonal logging into execa, enough to see that my npm install was exiting with a a SIGKILL. Just wondering if an easy but effective fix/workaround here would be to retry once from lerna if an npm install fails with a SIGKILL? |
Hi Folks 👋 Please take a look at our published roadmap for Lerna v7 here: #3410 One of the key items covered at length on there (please do read it for full context) is that now that we find ourselves in late 2022, it no longer makes sense for lerna to supplement package management concerns (such as installation, boostrapping, linking etc) which are covered reliably for monorepo workspaces by the three main package managers: npm, yarn and pnpm. If you have any specific concerns please do join in on that discussion, and provide as much context as possible. Many thanks 🙏 |
The latest RC version fails when running
lerna bootstrap
. I'm not sure when it was introduced, though, because only today builds started failing on Travis while RC3 was released 8 days ago. So, I may be actually running into two separate issues. Both turned to have the same solution, though, switching off concurrency.The issue, at least now, can be reproduced in the following way:
When I try with
--concurrency=1
the issue doesn't seem to appear:It also proved to help with a bit more complicated situation I had on Travis: https://travis-ci.org/ckeditor/ckeditor5/builds/226105896. It worked well after disabling concurrency: https://travis-ci.org/ckeditor/ckeditor5/builds/226101027.
I can see that similar issues were already reported: #397 and #616. However, this may be the first scenario in which the issue can be easily reproduced.
Your Environment
lerna --version
npm --version
node --version
The text was updated successfully, but these errors were encountered: