Skip to content

@angular-devkit/build-angular required packages are requiring a peer of webpack@^4.0.0 with webpack "5.27.2" installed #20359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 of 16 tasks
varevacdamir opened this issue Mar 23, 2021 · 3 comments

Comments

@varevacdamir
Copy link

varevacdamir commented Mar 23, 2021

🐞 Bug report

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc
  • npm install webpack@latest

Is this a regression?

Yes, the previous version in which this bug was not present was:
"@angular-builders/custom-webpack": "11.0.0"
"webpack": "4.43.0"

Description

We are using "@angular-builders/custom-webpack": "11.0.0" in our devDependencies, and everything worked as expected with the usage of "webpack": "4.43.0".

After we updated our "webpack" dependency to version "5.27.2" we got some warnings related to "@angular-devkit/build-angular" required packages, these are the warnings:

  • @angular-devkit/[email protected] requires a peer of webpack@^4.6.0 but none is installed. You must install peer dependencies yourself.
  • @ngtools/[email protected] requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
  • [email protected] requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.

It can be reproduced with the latest "@angular-devkit/build-angular": "0.1102.5"

🔬 Minimal Reproduction

ng new test-app
npm install webpack@latest

🔥 Exception or Error



npm WARN @angular-devkit/[email protected] requires a peer of webpack@^4.6.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ngtools/[email protected] requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.

🌍 Your Environment


Angular CLI: 11.2.5
Node: 14.15.4
OS: win32 x64

Angular: 11.2.6
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1102.5
@angular-devkit/build-angular   0.1102.5
@angular-devkit/core            11.2.5
@angular-devkit/schematics      11.2.5
@angular/cli                    11.2.5
@schematics/angular             11.2.5
@schematics/update              0.1102.5
rxjs                            6.6.6
typescript                      4.1.5
webpack                         5.27.2

Anything else relevant?

@varevacdamir varevacdamir changed the title @angular-devkit/build-angular required packages are requiring a peer of webpack@^4.0.0 whit webpack "5.27.2" installed @angular-devkit/build-angular required packages are requiring a peer of webpack@^4.0.0 with webpack "5.27.2" installed Mar 23, 2021
@alan-agius4
Copy link
Collaborator

Hi @varevacdamir,

Thanks for this report.

In version 11 this is the expected behaviour as Webpack version 5 support is still experimental. This will be addressed in version 12 when #20084 is merged.

Kindly subscribe to the above mentioned PR, thanks.

@varevacdamir
Copy link
Author

Thank you @alan-agius4.

@thw0rted thw0rted mentioned this issue Apr 13, 2021
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Apr 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants