Repository: ng-packagr/ng-packagr

Issue #2485: ng-packagr@14.3.0 depends on @angular/compiler-cli@"^15.0.0-next instead of @angular/compiler-cli@"^14.0.0
Created: 2022-11-23T15:57:24Z
Type of Issue
[ x] Bug Report
[ ] Feature Request

Description
ng-packagr@14.3.0 depends on @angular/compiler-cli@"^15.0.0-next instead of @angular/compiler-cli@"^14.0.0
So npm will crash during this install:
npm ERR! While resolving: ng-packagr@14.3.0
npm ERR! Found: @angular/compiler-cli@14.2.12
npm ERR! node_modules/@angular/compiler-cli
npm ERR!   dev @angular/compiler-cli@"^14.1.0" from the root project
npm ERR!   peer @angular/compiler-cli@"^14.0.0" from @angular-devkit/build-angular@14.2.10
npm ERR!   node_modules/@angular-devkit/build-angular
npm ERR!     dev @angular-devkit/build-angular@"^14.1.3" from the root project
npm ERR!   1 more (@ngtools/webpack)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/compiler-cli@"^15.0.0-next" from ng-packagr@14.3.0
npm ERR! node_modules/ng-packagr
npm ERR!   dev ng-packagr@"^14.1.0" from the root project
npm ERR!   peerOptional ng-packagr@"^14.0.0" from @angular-devkit/build-angular@14.2.10
npm ERR!   node_modules/@angular-devkit/build-angular
npm ERR!     dev @angular-devkit/build-angular@"^14.1.3" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: @angular/compiler-cli@15.0.1
npm ERR! node_modules/@angular/compiler-cli
npm ERR!   peer @angular/compiler-cli@"^15.0.0-next" from ng-packagr@14.3.0
npm ERR!   node_modules/ng-packagr
npm ERR!     dev ng-packagr@"^14.1.0" from the root project
npm ERR!     peerOptional ng-packagr@"^14.0.0" from @angular-devkit/build-angular@14.2.10
npm ERR!     node_modules/@angular-devkit/build-angular
npm ERR!       dev @angular-devkit/build-angular@"^14.1.3" from the root project


How To Reproduce
Simply try to create an angular 14 lib:
npx -p @angular/cli@14 ng new test --create-application=false
cd test
npx -p @angular/cli@14 ng generate library test

Expected Behaviour
a new angular lib is created without any error
Version Information
$ node_modules/.bin/ng-packagr --version
ng-packagr: 14.3.0
@angular/*: 14.1.0
node: 14.20.0
npm: 8.19.3

Duplicate issue #2585: ng update fails with "incompatible peer dependency" with v14.3.0
Created: 2023-03-16T21:02:56Z
Type of Issue
[x] Bug Report
[ ] Feature Request

Description
Running ng update on an angular library using angular 13 fails with an  incompatible peer dependency.
Package "ng-packagr" has an incompatible peer dependency to "@angular/compiler-cli" (requires "^15.0.0-next", would install "14.3.0")

Seems to have been introduced in this commit. e3eca0a
You can see the 15-next peer dep in the 14.3.0 tag. This seems like the only change in 14.3.0 so I'm kinda wondering if 14.3.0 was released by accident. This change is not in the v14 branch, and that package version is still 14.2.2 
  
    
      ng-packagr/package.json
    
    
         Line 64
      in
      335289d
    
  
  
    

        
          
           "@angular/compiler-cli": "^15.0.0-next", 
        
    
  


How To Reproduce
Run this update command on an angular 13 library using ng-packager 13. The update will try to install 14.3.0 which has a peer dependency on @angular/compiler-cli@^15.0.0-next
ng update @angular/core@14 @angular/cli@14

Expected Behavior
Angular update works without needing to force.
Version Information
ng-packagr: 13.3.1
@angular/*: 13.3.12
typescript: 4.6.4
rxjs: 6.6.7
node: 14.18.1
npm: 8.19.4

Closing comment (2023-03-22T12:05:47Z): Duplicate of #2485