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.

HookWebpackError: Maximum call stack size exceeded

See original GitHub issue

🐞 Bug report

Command (mark with an x)

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

Is this a regression?

The production build worked perfectly fine under Angular 11.

Description

Optimisation does not work under Angular 12 after upgrading the project.

πŸ”¬ Minimal Reproduction

Production build with optimisation turned on.

πŸ”₯ Exception or Error


```
[error] HookWebpackError: Maximum call stack size exceeded
    at makeWebpackError (/Users/olafsiebert/html/allstarschallenge/node_modules/webpack/lib/HookWebpackError.js:48:9)
    at /Users/olafsiebert/html/allstarschallenge/node_modules/webpack/lib/Compilation.js:2515:12
    at eval (eval at create (/Users/olafsiebert/html/allstarschallenge/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:114:1)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
-- inner error --
RangeError: Maximum call stack size exceeded
    at String.match (<anonymous>)
    at streamChunksOfRawSource (/Users/olafsiebert/html/allstarschallenge/node_modules/webpack/node_modules/webpack-sources/lib/helpers/streamChunksOfRawSource.js:14:25)
    at module.exports (/Users/olafsiebert/html/allstarschallenge/node_modules/webpack/node_modules/webpack-sources/lib/helpers/streamChunksOfRawSource.js:40:5)
    at RawSource.streamChunks (/Users/olafsiebert/html/allstarschallenge/node_modules/webpack/node_modules/webpack-sources/lib/RawSource.js:56:10)
    at module.exports (/Users/olafsiebert/html/allstarschallenge/node_modules/webpack/node_modules/webpack-sources/lib/helpers/streamChunks.js:13:17)
    at ReplaceSource.streamChunks (/Users/olafsiebert/html/allstarschallenge/node_modules/webpack/node_modules/webpack-sources/lib/ReplaceSource.js:176:44)
    at module.exports (/Users/olafsiebert/html/allstarschallenge/node_modules/webpack/node_modules/webpack-sources/lib/helpers/streamChunks.js:13:17)
    at streamAndGetSourceAndMap (/Users/olafsiebert/html/allstarschallenge/node_modules/webpack/node_modules/webpack-sources/lib/helpers/streamAndGetSourceAndMap.js:27:53)
    at CachedSource.streamChunks (/Users/olafsiebert/html/allstarschallenge/node_modules/webpack/node_modules/webpack-sources/lib/CachedSource.js:208:35)
    at module.exports (/Users/olafsiebert/html/allstarschallenge/node_modules/webpack/node_modules/webpack-sources/lib/helpers/streamChunks.js:13:17)
    at ConcatSource.streamChunks (/Users/olafsiebert/html/allstarschallenge/node_modules/webpack/node_modules/webpack-sources/lib/ConcatSource.js:112:55)
    at module.exports (/Users/olafsiebert/html/allstarschallenge/node_modules/webpack/node_modules/webpack-sources/lib/helpers/streamChunks.js:13:17)
    at streamAndGetSourceAndMap (/Users/olafsiebert/html/allstarschallenge/node_modules/webpack/node_modules/webpack-sources/lib/helpers/streamAndGetSourceAndMap.js:27:53)
    at CachedSource.streamChunks (/Users/olafsiebert/html/allstarschallenge/node_modules/webpack/node_modules/webpack-sources/lib/CachedSource.js:208:35)
    at module.exports (/Users/olafsiebert/html/allstarschallenge/node_modules/webpack/node_modules/webpack-sources/lib/helpers/streamChunks.js:13:17)
    at ConcatSource.streamChunks (/Users/olafsiebert/html/allstarschallenge/node_modules/webpack/node_modules/webpack-sources/lib/ConcatSource.js:112:55)

```

🌍 Your Environment


     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / β–³ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 12.2.2
Node: 14.15.5
Package Manager: npm 7.16.0
OS: darwin x64

Angular: 12.2.2
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, material, platform-browser, platform-browser-dynamic
... platform-server, router, service-worker

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1202.2
@angular-devkit/build-angular   12.2.2
@angular-devkit/core            12.2.2
@angular-devkit/schematics      12.2.2
@angular/fire                   6.1.5
@nguniversal/builders           12.1.0
@nguniversal/express-engine     12.1.0
@schematics/angular             12.2.2
rxjs                            6.6.7
typescript                      4.3.5

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:9

github_iconTop GitHub Comments

3reactions
alan-agius4commented, Sep 13, 2021

@Bjeaurn, no, there isn’t anything to do from our end.

You just need to re-generate the lock file.

0reactions
angular-automatic-lock-bot[bot]commented, Oct 14, 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

Webpack, Sass - Maximum call stack size exceeded
The stack trace is as follows: Uncaught RangeError: Maximum call stack size exceeded at hotAddUpdateChunk (bootstrap .
Read more >
RangeError: Maximum call stack size exceeded, npm run dev
This error is almost always means you have a problem with recursion in JavaScript code, as there isn't any other way in JavaScript...
Read more >
Maximum call stack size exceeded Error in TypeScript
The "RangeError: Maximum call stack size exceeded" occurs when a function is being called so many times that the invocations exceed the call...
Read more >
JavaScript Error: Maximum Call Stack Size Exceeded
If you see the β€œMaximum Call Stack Size Exceeded” error, there's likely a problem with a recursive function within your JavaScript code.
Read more >
JavaScript RangeError: Maximum Call Stack Size Exceeded
JavaScript RangeError: Maximum Call Stack Exceeded is thrown when there are too many function calls, or if a function is missing a baseΒ ......
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