Skip to content

Impossible to install @angular-devkit/build-angular ~0.1102.13 on npm7 #20888

@jcesarmobile

Description

@jcesarmobile

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

Yes, the previous version in which this bug was not present was: 0.1102.10

Description

It's impossible to install @angular-devkit/build-angular ~0.1102.13 if using npm7
It uses postcss 8.2.14, but also cssnano 5.0.2, which uses cssnano-preset-default@5.1.0, which has a peer dependency to postcss@"^8.2.15", so npm 7 fails to install because of peer dependency mismatch

A clear and concise description of the problem...

🔬 Minimal Reproduction

mkdir justatest
cd justatest
npm init 
npm install @angular-devkit/build-angular@~0.1102.13

🔥 Exception or Error




npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! Found: postcss@8.2.14
npm ERR! node_modules/postcss
npm ERR!   postcss@"8.2.14" from @angular-devkit/build-angular@0.1102.13
npm ERR!   node_modules/@angular-devkit/build-angular
npm ERR!     @angular-devkit/build-angular@"~0.1102.13" from the root project
npm ERR!   peer postcss@"^8.1.0" from autoprefixer@10.2.4
npm ERR!   node_modules/autoprefixer
npm ERR!     autoprefixer@"10.2.4" from @angular-devkit/build-angular@0.1102.13
npm ERR!     node_modules/@angular-devkit/build-angular
npm ERR!       @angular-devkit/build-angular@"~0.1102.13" from the root project
npm ERR!   9 more (css-loader, cssnano, postcss-import, postcss-loader, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer postcss@"^8.2.15" from cssnano-preset-default@5.1.0
npm ERR! node_modules/cssnano/node_modules/cssnano-preset-default
npm ERR!   cssnano-preset-default@"^5.0.1" from cssnano@5.0.2
npm ERR!   node_modules/cssnano
npm ERR!     cssnano@"5.0.2" from @angular-devkit/build-angular@0.1102.13
npm ERR!     node_modules/@angular-devkit/build-angular
npm ERR!       @angular-devkit/build-angular@"~0.1102.13" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

🌍 Your Environment

no need to use ng command, it fails if you just try to install the package




npm 7

Anything else relevant?

possible solution is to update the postcss dependency to 8.2.15, our use ~8.2.15 so it doesn't break again anytime soon

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions