-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Caching errors are back a la 5729 #5962
Comments
Can you provide more information? What builders are being used? Can you provide a repo to help reproduce the issue? The issue was resolved in |
Updated the ticket with build-angular version. I cannot provide the private repo and I cannot yet provide a test repo because I don't yet know what causes the issue. I will be downgrading libraries incrementally today to try find out which which version of which library caused this regression. |
Reporting back...
Yet, my repo is consistently only building 4 out of 11 SPAs without giving any error or trying to compile the libraries. The build takes approx 10 minutes to build from scratch when it should be taking 4 hours. Here's my demo repo with the same dependencies as my main repo: https://github.com/bjornharvold/nx-dev-5962 The issue I am seeing looks exactly like the previous issue: #5729. Just don't know how to replicate. I can't share the private repo but we could set up a Google Meet and walk you through it. |
Following up on our investigations
The results are the same with using parallel builds or not. |
Following up on our investigations
Same error and consistently building the same 4 SPAs. No other errors. |
CI build log - No errors - You just see it failing at the end because it's expecting a directory to exist under app/dist. |
I added --skip-nx-cache to my build command. Also did not have an effect. I tried building a single SPA with no luck. The build needed to compile 425 modules but the build just stopped after about a 100.
I noticed a deprecation warning half way through when I tried to build the single SPA
Other than that there is no indication of failure. Build is green but no artifact was built. |
Notice the long list of libraries that need to get built [assuming in that order] at the beginning of the log and that it continually builds down to and including advertising-ui-banner and then skips a ton of libraries. No indication as to why. |
Now if I try to build the next library under advertising-ui-banner, namely: web-components-feature-hotel-card, it fails because a lot of dependencies never got built.
You can see the libraries listed in the correct order at the beginning of the log, but they are never mentioned as having been built. E.g. meeting-room-domain. These libraries would get mentioned even if they were taken from the nx cache. But instead they just disappear and are never heard of. So I think this is no longer a cache issue but a silent error or similar that fails in a way that lets the build go on so we don't even know where to look. Thoughts? I haven't been able to build for almost a week and colleagues and customers are waiting on my team to try and solve this. Is there a way for my team to debug this in more depth? Otherwise, we are unsure on how to proceed. Cheers |
@bjornharvold sorry to hear that, but without a reproduction, it's very hard for us to troubleshoot this, especially this type of issue where is not clear what the problem could be, we'd be blind guessing things. Last time, I was able to troubleshoot the #5729 issue because a way to reproduce it was shared. I just checked, just in case, the previous issue reproduction repos with the latest Nx and Angular packages versions and those are working correctly, so it doesn't seem to be the same issue. You mentioned that after the fix for #5729 everything was working fine, I know you've tried several things, but just in case, I'd recommend you to try and pin the versions of the packages to the exact version the fix had and see if it works. Make sure to only update the version of the packages and not modify any other code:
You can also try to check out the latest working commit and see if it's still working. This could also confirm is not related to a package version, but to a code change if that commit is still working correctly. Some questions to think about:
As I said, it's really hard for us to troubleshoot it without a clear reproduction and preferably a minimal one. If you can reproduce the issue locally and isolate it to a project, try to pick the smallest project you have, remove as many deps as you can while still having the issue, this would help the debugging process. Hopefully, some of the points above can help you troubleshoot it. |
Hi @leosvelperez, Thank you for your detailed response! Very appreciated :-) We started pulling the build apart and here is what we learned:
In a nutshell, I think --with-deps gets confused with large dependency graphs [since when I am unsure]. What's also confusing is that we don't have to add So my build runs and all we had to do was remove the |
@FrozenPandaz This is happening for us on 12.3.6 when using |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
I do a clean build of my 1000+ module monorepo which means I remove node_modules/.cache/nx and dist folders. A full build is almost 4 hours but now it runs through it in less than 15 minutes with barely any modules created.
My command is:
node --max_old_space_size=16384 ./node_modules/.bin/nx run-many --target=build --projects=administration,booking-engine,corporate,developer,extranet,hotel-booking-engine,maintenance,seller,single-sign-on,travel-agent,web-components --configuration=production --with-deps --parallel --max-parallel=8
Expected Behavior
All SPA apps should be built at the end of it
Steps to Reproduce
As with #5729, it's very hard to tell you why it suddenly stopped working. After #5729 was resolved, the build worked flawlessly. In the meantime, Angular got updated and it stopped working again.
Failure Logs
There are no error logs. It just completes with a success.
Environment
@nrwl/angular : 12.3.6
@nrwl/cli : 12.3.6
@nrwl/cypress : 12.3.6
@nrwl/devkit : 12.3.6
@nrwl/eslint-plugin-nx : 12.3.6
@nrwl/express : Not Found
@nrwl/jest : 12.3.6
@nrwl/linter : 12.3.6
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : Not Found
@nrwl/react : Not Found
@nrwl/schematics : Not Found
@nrwl/tao : 12.3.6
@nrwl/web : Not Found
@nrwl/workspace : 12.3.6
@nrwl/storybook : 12.3.6
@nrwl/gatsby : Not Found
typescript : 4.2.4
Angular : 12.0.4
Angular CLI : 12.0.3
@angular-devkit/build-angular : 12.0.3
ng-packagr 12.0.5
The text was updated successfully, but these errors were encountered: