pnpm incompatibile with Angular ivy (ngcc)

Created on 29 Jul 2020  ·  3Comments  ·  Source: pnpm/pnpm

Ubuntu 20.04
pnpm version: 5.4.6

Expected behavior:

pnpm i in pnpm workspace should install packages regardless there is angular app with ngcc.

Actual behavior:

pnpm assumes node_modules contains only directories (quite correctly), but angular compiler generates __ngcc_entry_points__.json there which is not directory and pnpm crashes:

ERROR  ENOTDIR: not a directory, open '/workspace/app/node_modules/__ngcc_entry_points__.json/package.json'

This issue is related to https://github.com/angular/angular/issues/38023
I'm not sure if angular team would like to solve this issue on their side so I decided to open issue here as well.

S bug

Most helpful comment

This also happens on a client project and we've got some ugly build pipeline hacks to work around it. Would be nice if we didn't have to.

This could easily be passed off as an Angular bug (it really _should not_ be writing to node_modules!) but on the other hand, pnpm should be more robust in handling of this. Hard crashing is not optimal.

All 3 comments

This also happens on a client project and we've got some ugly build pipeline hacks to work around it. Would be nice if we didn't have to.

This could easily be passed off as an Angular bug (it really _should not_ be writing to node_modules!) but on the other hand, pnpm should be more robust in handling of this. Hard crashing is not optimal.

Sure, we can fix this on pnpm side

Sure, we can fix this on pnpm side

Legend! Thanks 😍

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Dmitry-N-Medvedev picture Dmitry-N-Medvedev  ·  4Comments

vjpr picture vjpr  ·  5Comments

ExE-Boss picture ExE-Boss  ·  4Comments

andreineculau picture andreineculau  ·  3Comments

aleclarson picture aleclarson  ·  4Comments