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

Closed

Description

@varevacdamir

馃悶 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/build-webpack@0.1102.5 requires a peer of webpack@^4.6.0 but none is installed. You must install peer dependencies yourself.
  • @ngtools/webpack@11.2.5 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
  • webpack-dev-middleware@3.7.2 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/build-webpack@0.1102.5 requires a peer of webpack@^4.6.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ngtools/webpack@11.2.5 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-middleware@3.7.2 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?

Activity

  1. 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[/+] on Mar 23, 2021
  2. alan-agius4 commented on Mar 23, 2021

    @alan-agius4
    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.

  3. varevacdamir commented on Mar 23, 2021

    @varevacdamir
    Author

    Thank you @alan-agius4.

  4. angular-automatic-lock-bot commented on Apr 23, 2021

    @angular-automatic-lock-bot

    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.

  5. locked and limited conversation to collaborators on Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions