Skip to content

Forced version of the webpack #20977

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 15 tasks
janousek opened this issue May 28, 2021 · 2 comments
Closed
1 of 15 tasks

Forced version of the webpack #20977

janousek opened this issue May 28, 2021 · 2 comments

Comments

@janousek
Copy link

🐞 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: <12.0.0

Description

In angular 12.x.x version of the webpack is forced by the package.json in @Angular-devkit\build-angular


Is there any reason not to use minor release? Like this:

"webpack": "^5.36.2",

If we install different version of the webpack in our project it is installed twice. And it causes version mishmash and produces errors like this: "TypeError: The 'compilation' argument must be an instance of Compilation..."

There is already reported several bugs caused by this:
#20768
#20773
#20786

🔥 Exception or Error

TypeError: The 'compilation' argument must be an instance of Compilation
    at getCompilationHooks ....................



Anything else relevant?

@alan-agius4
Copy link
Collaborator

Hi @janousek,

We pin all of our versions to ensure that the Angular CLI doesn't break when a 3rd party direct dependency cut a release and therefore provide a more stable tool.

Over the years, a number of packages had breaking changes / serious regressions including in patch versions which otherwise would have broke a lot of users. Webpack is one of these packages, which even recently in version 3.37.1 had a regression which would have cause all Angular CLI projects stop work if consumed.

Regarding the mentioned issues, those errors seems to be caused by NPM 7 and a defect in its module hoisting logic. We did notice NPM about this issue and are waiting for a resolution.

@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 Jun 28, 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