Caching errors are back a la 5729
See original GitHub issueCurrent 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
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (2 by maintainers)
Hi @leosvelperez,
Thank you for your detailed response! Very appreciated 😃
We started pulling the build apart and here is what we learned:
--buildable
flag FYI--with-deps
flag. E.g.nx build extranet
. What is strange is that, in the past, the app wouldn’t build if we didn’t add --with-deps because it would be complaining abut missing dependencies and tell us to build those first.--with-deps
flag.--with-deps
flag. E.g.nx build extranet --with-deps
. No errors, the build will just stop building and it will stop building consistently at the same place for each app respectively. So, different SPA will stop at their own same specific spot in the build process every time. The build will omit building certain libraries [as explained above] without notifying us and we think that stops the build when the next libraries, that are dependent on those libraries, can’t find them.run-many
also works fine WITHOUT the--with-deps
flag. E.g.nx run-many --target build --projects extranet,booking-engine --configuration production
.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
--with-deps
any longer as the apps are intelligent enough to build its own dependencies. Was this always the case. I am pretty certain I remember my apps complaining about missing dependencies and to build them first when I tried to build them before.So my build runs and all we had to do was remove the
--with-deps
flag. So strange.@FrozenPandaz This is happening for us on 12.3.6 when using
@nrwl/workspace:run-commands
- it returns the cached output to the console (success|failure) but doesn’t restore the build files (dist)