A minimalistic reproduction of the issue described in angular/angular#39282
It contains two vanilla Angular projects, each with one library. The library in the coreApp project is configured in ng-package.json to build into the local_modules folder, and its module imports @angular/common; the userApp project consumes the coreLib via npm from the local_modules folder.
- Open coreApp folder in terminal.
- Run
npm install - Run
ng build coreLib. - Open userApp folder in terminal.
- Run
npm install. - Run
ng build userLib. - The build fails with ERROR: Cannot resolve type entity i2.CommonModule to symbol.
In this case it fails on the CommonModule, but if you import any other Angular (or third party in general?) module, it fails with a similar message.