question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Latest 12.0.2 crashes on serve or build

See original GitHub issue

🐞 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), <anonymous>: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), <anonymous>: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 (<anonymous>)
    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

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
arobinsoncommented, May 27, 2021

The issue is not just with NPM 7 but it is the fact that @angular-devkit/build-angular has a dependency of "webpack": "5.36.2", which means that the top level project must use that webpack version, not a later version with much needed bug fixes. Webpack 5.36.2 has serious performance issues and due to the dependency, newer versions cannot be used

0reactions
angular-automatic-lock-bot[bot]commented, Jun 27, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

serve crashes randomly after upgrading to Angular 12
Here is the error ng serve fails randomly with: ⠴ Generating browser application bundles (phase: building)... <--- Last few GCs ---> [58819: ...
Read more >
Crash starting app after upgrade to Monterey
Need some help debugging an issue that only started after upgrading to Monterey. Our application is failing to start resulting in a segmentation...
Read more >
Verse On Premise Server Crashes & Restarts With HTTP ...
I have a Windows 2012R2 server (virtual) providing Verse On Premise to the business. It was at Domino V11.0.1FP2 64bit and has been...
Read more >
FIX: Programs that are built in Visual C++ 2013 crash with " ...
When you build a program by using Microsoft Visual C++ 2013, the program crashes and you receive an "Illegal Instruction" exception.
Read more >
782995 – X server crashes
Last build xorg-x11-server-1.11.99.901-3.20120124.fc17 also crashes. ... It looks like the final comes with 12.0.2-1, but it still crashes on startup after ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found