Skip to content

Latest 12.0.2 crashes on serve or build #20961

@bobskigit

Description

@bobskigit

🐞 Bug report

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

Is this a regression?

No

Description

When attempting ng b or ng s, compilation crashes

🔬 Minimal Reproduction

🔥 Exception or Error


C:\Users\bobla\Documents\projects\videoads\node_modules\webpack\lib\javascript\JavascriptModulesPlugin.js:125
                        throw new TypeError(
                              ^

TypeError: The 'compilation' argument must be an instance of Compilation
    at getCompilationHooks (C:\Users\bobla\Documents\projects\videoads\node_modules\webpack\lib\javascript\JavascriptModulesPlugin.js:125:10)    at C:\Users\bobla\Documents\projects\videoads\node_modules\webpack\lib\javascript\CommonJsChunkFormatPlugin.js:43:19
    at Hook.eval [as call] (eval at create (C:\Users\bobla\Documents\projects\videoads\node_modules\tapable\lib\HookCodeFactory.js:19:10), :7:1)
    at Hook.CALL_DELEGATE [as _call] (C:\Users\bobla\Documents\projects\videoads\node_modules\tapable\lib\Hook.js:14:14)
    at Compiler.newCompilation (C:\Users\bobla\Documents\projects\videoads\node_modules\@angular-devkit\build-angular\node_modules\webpack\lib\Compiler.js:1030:30)
    at C:\Users\bobla\Documents\projects\videoads\node_modules\@angular-devkit\build-angular\node_modules\webpack\lib\Compiler.js:1073:29    
    at Hook.eval [as callAsync] (eval at create (C:\Users\bobla\Documents\projects\videoads\node_modules\tapable\lib\HookCodeFactory.js:33:10), :15:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (C:\Users\bobla\Documents\projects\videoads\node_modules\tapable\lib\Hook.js:18:14)
    at Compiler.compile (C:\Users\bobla\Documents\projects\videoads\node_modules\@angular-devkit\build-angular\node_modules\webpack\lib\Compiler.js:1068:28)
    at Compiler.runAsChild (C:\Users\bobla\Documents\projects\videoads\node_modules\@angular-devkit\build-angular\node_modules\webpack\lib\Compiler.js:520:8)
    at C:\Users\bobla\Documents\projects\videoads\node_modules\@ngtools\webpack\src\resource_loader.js:150:27
    at new Promise ()
    at WebpackResourceLoader._compile (C:\Users\bobla\Documents\projects\videoads\node_modules\@ngtools\webpack\src\resource_loader.js:149:16)
    at WebpackResourceLoader.get (C:\Users\bobla\Documents\projects\videoads\node_modules\@ngtools\webpack\src\resource_loader.js:239:44)    
    at Object.resourceHost.readResource (C:\Users\bobla\Documents\projects\videoads\node_modules\@ngtools\webpack\src\ivy\host.js:30:35)     
    at AdapterResourceLoader.preload (C:\Users\bobla\Documents\projects\videoads\node_modules\@angular\compiler-cli\src\ngtsc\resource\src\loader.js:88:39)

🌍 Your Environment



     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 12.0.2
Node: 16.2.0
Package Manager: npm 7.14.0
OS: win32 x64

Angular: 12.0.2
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... pwa, router, service-worker

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1200.2
@angular-devkit/build-angular   12.0.2
@angular-devkit/build-webpack   0.1200.2
@angular-devkit/core            12.0.2
@angular-devkit/schematics      12.0.2
@schematics/angular             12.0.2
ng-packagr                      12.0.2
rxjs                            6.6.7
typescript                      4.2.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions