ngcc clashes with pnpm
See original GitHub issueWhen using pnpm as a package manager, ng build (or serve) causes application errors on the first run. Running ng build (or serve) a second time fixes the issues.
This process can cause a few different types of application errors, it is hard to pin down. Check the repro for a reproduction of Cannot read property 'bindingStartIndex' of null
error.
Other errors caused:
- Does not have ‘ɵmod’ property (application)
- Tried to overwrite (…)__ivy_ngcc_bak with an ngcc back up file, which is disallowed (build)
I suspect this is because ngcc manipulates the node_modules folder in a way that is incompatible with pnpm.
Suggestions:
- keep node_modules readonly.
- custom location for ngcc output (would be great for CI pipeline build caching).
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
pnpm postinstall ngcc doesn't run as should - Stack Overflow
The console output shows that the postinstall script gets executed, but then the pnpm install process finishes without executing ngcc.
Read more >pnpm/pnpm - Gitter
I have multiple libraries and got this problem of running postinstall (cmd: ngcc) as part of an upgrade to angular v9. unfortunately it's...
Read more >Problem with NGCC - David Votrubec
NGCC stands for Angular Compatibility Compiler, which recompiles various ... Error: Tried to overwrite /opt/rb3/node_modules/.pnpm/@angular+ ...
Read more >The year 2021 for pnpm
It is the end of the year and it was a good year for pnpm, so let's see how it went.
Read more >The Angular linker (goodbye ngcc!) - Ninja Squad
Angular 11.1 introduced a new compilation mode. It allows to partially compile a library before shipping it to NPM. What does that mean?...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Heya, using pnpm is not supported (see #32087) and I’m somewhat surprised that it even works to some extend.
ngcc exists to bridge the gap between ViewEngine libraries and Ivy’s compilation output. We are working towards making the core packages be published in native Ivy format starting from v13 and there are no plans to revisit how ngcc works to make it compatible with tools like pnpm (and Yarn P’n’P etc.) per Alex’s comment in https://github.com/angular/angular/issues/32087#issuecomment-523225437.
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.