Running ngcc in postinstall. Angular CLI should not run as part of the build step
See original GitHub issue🐞 bug report / feature request
This issue is a follow up to https://github.com/angular/angular/issues/35000
Affected Package
Is this a regression?
Maybe - https://github.com/angular/angular/issues/35000
Description
The advice in https://github.com/angular/angular/issues/35000#issuecomment-579123805 from @Toxicable was to set up a postinstall hook like so:
If you run ngcc yourself beforehand then the angular cli wont run it as part of it’s build step. That should solve you issue of building multiple apps in parallel
"postinstall": "ngcc --create-ivy-entry-points --properties es2015 browser module main",
the angular cli wont run it as part of it’s build step. <- this is the key part I would expect to happen but it doesn’t seem to be the case. as I see ngcc being run in my build for every webpack build
Another process, with id 44, is currently running ngcc.
--
5 | Waiting up to 25s for it to finish.
6 | Another process, with id 124, is currently running ngcc.
7 | Waiting up to 25s for it to finish.
8 | Another process, with id 44, is currently running ngcc.
9 | Waiting up to 25s for it to finish.
10 | Another process, with id 117, is currently running ngcc.
11 | Waiting up to 25s for it to finish.
12 | Another process, with id 58, is currently running ngcc.
13 | Waiting up to 25s for it to finish.
14 | Another process, with id 44, is currently running ngcc.
15 | Waiting up to 25s for it to finish.
Unfortunately when CI is busy with other work the max retries is used up and the build fails. We have about 10 parallel builds of different flavors of our Angular App so there is A LOT of parallelism going on.
Would it be possible to disable NGCC in ngtools/webpack builds when the dependencies have already been compiled before? @Toxicable @petebacondarwin @AndrewKushnir @gkalpak
🌍 Your Environment
Angular Version:
Angular: 9.1.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (5 by maintainers)
Top GitHub Comments
@gkalpak Please see this repo for a reproducible test case https://github.com/Rush/ngcc-issue-repro/blob/master/README.md
Please let me know if you have any questions or need additional clarity.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.