Skip to content

Angular 11 with webpack 5 breaks with webpackMissingModule on recompilation聽#19934

Description

@jawadsh123

馃悶 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?

No, breaks after moving to webpack 5

Description

An Angular 11 app with webpack 5 breaks after recompilation (for changes on certain files)

Cannot find module '@angular/core'
at webpackMissingModule ...

馃敩 Minimal Reproduction

馃敟 Exception or Error

image

馃實 Your Environment


Angular CLI: 11.1.2
Node: 14.15.1
OS: linux x64

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

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1101.2
@angular-devkit/build-angular   0.1101.2
@angular-devkit/core            11.1.2
@angular-devkit/schematics      11.1.2
@angular/cli                    11.1.2
@schematics/angular             11.1.2
@schematics/update              0.1101.2
rxjs                            6.6.3
typescript                      4.0.5

Anything else relevant?

Originally I had posted this on webpack webpack/webpack#12561
reason for my suspicion was this recent change to rebuildModule in webpack 5 -> webpack/webpack#11433
and the dependency of AngularWebpackPlugin on rebuildModule
But my understanding of both the tools is fairly limited, and webpack folks think this might be a deeper incompatibility with webpack 5

Activity

  1. added this to the Backlog milestone on Feb 2, 2021
  2. linked a pull request that will close this issueUpgrade tooling to use Webpack 5 #20466on Apr 8, 2021
  3. angular-automatic-lock-bot commented on May 9, 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.

  4. locked and limited conversation to collaborators on May 9, 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

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions