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:
- Created 2 years ago
- Reactions:2
- Comments:9
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Bjeaurn, no, there isnβt anything to do from our end.
You just need to re-generate the lock file.
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.