The call stack has exceeded its maximum size in the streamChunksOfSourceMap.js file

Angular 12.2.0 is causing me some trouble. When I try to start it, I keep getting this error:

Generating browser application bundles (phase: sealing).../Users/.../node_modules/webpack/node_modules/webpack-sources/lib/helpers/streamChunksOfSourceMap.js:21
        const lines = source.match(SPLIT_LINES_REGEX);
                             ^

RangeError: Maximum call stack size exceeded
    at String.match (<anonymous>)
    at streamChunksOfSourceMapFull (/Users/.../node_modules/webpack/node_modules/webpack-sources/lib/helpers/streamChunksOfSourceMap.js:21:23)
    at module.exports (/Users/.../node_modules/webpack/node_modules/webpack-sources/lib/helpers/streamChunksOfSourceMap.js:389:6)
    at SourceMapSource.streamChunks (/Users/.../node_modules/webpack/node_modules/webpack-sources/lib/SourceMapSource.js:211:11)
    at module.exports (/Users/.../node_modules/webpack/node_modules/webpack-sources/lib/helpers/streamChunks.js:13:17)
...

This issue seems quite random as nothing has been changed and rebuilding doesn't always solve it. Sometimes restarting the app brings up the error again.

I tried increasing the maximum call stack size but it didn't help. It feels like a bug because even cleaning cache, deleting node modules, and reinstalling don't guarantee a fix. The problem persists sporadically.

I eventually discovered that the root cause lies in streamChunksOfSourceMap.js, which Angular uses to create sourcemaps. By setting the sourceMap property under configurations in angular.json to false, the issue disappears, although debugging without sourcemaps is challenging.

Has anyone encountered a similar issue before?

Answer №1

There appears to be a problem related to webpack, which is being monitored here

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

A step-by-step guide on dynamically altering button colors in Angular 2

Struggling to dynamically change the color of my button, any suggestions? <a class="button buttonaquacss button-mini button-aqua text-right pull-right" (click)='send(button,detail.profile_id)' #button [ngStyle]="{'background-color' ...

Guide on how to duplicate a form upon clicking an "add" link in Angular 2

Is it possible to dynamically repeat a form in Angular2 when clicking on a link? I am looking for a way to add the same form below the previous one when a specific link is clicked. Any suggestions or immediate replies would be greatly appreciated. For ins ...

Why is TypeScript unable to locate the identifier 'Express'?

Embarking on an express application using TypeScript. Displayed below is the code in app.ts: import express = require("express"); let app: Express = express(); I've successfully installed Express by using npm install --save express @types/expres ...

Best Practices for Displaying Videos in Ionic 2

Can videos be properly integrated into Ionic pages? I'm encountering an issue where the buttons become unusable in fullscreen mode when using the html 5 video element. <video id="video1" width="100%" preload="metadata" controls webkit-playsinline& ...

Updating the latest version of Typescript from NPM is proving to be a challenge

Today, my goal was to update Typescript to a newer version on this machine as the current one installed is 1.0.3.0 (checked using the command tsc --v). After entering npm install -g typescript@latest, I received the following output: %APPDATA%\npm&b ...

Angular 4 ngbtypeahead search filter

I am looking for a way to remove previous results from ngbtypeahead if the user does not select an option. Even when all characters are removed from the input text, the results should not be displayed. NgbdTypeaheadHttp.component.ts export class NgbdType ...

What is the best way to extract HTML content from a MongoDB database?

One of the collections I have is as follows: { "_id" : 1, "title" : "Title", "description" : "<p>Text ...</p>", } I am currently working on getting the description in Angular. However, when I try to display this data, it appears a ...

What is the best way to obtain a promise from an interface or the content of a promise?

I am seeking clarity on a specific issue that seems to be quite common after researching similar questions. I am currently learning by studying and attempting to replicate another person's code. One of the methods in an injectable returns a promise, a ...

The attribute 'location' is not available in this particular 'window' type

I encountered an issue with my code after upgrading the typescript and react frameworks. The error is appearing on line window.location.assign("#/home/dashboard");. Despite researching articles, I am unable to resolve this issue. Additionally, I suspect th ...

Issue Encountered When Attempting to Reuse Component Loaded Dynamically

Recently, I developed a component that has the ability to load a child component dynamically with a template retrieved from the server. If you are interested in similar topics, check out this discussion here: Compile dynamic HTML in Angular 4/5 - somethin ...

Angular renders HTML files differently than web API responses

Having trouble displaying the content of an HTML file in a DIV - it works with a static file but fails with a dynamic file. Success with Static File: I had an EML file that I suspected needed parsing. By renaming the file extension to HTML, it rendered d ...

Navigating Dynamically between tabs - A How-to Guide

I am working on a mat-tab Angular app where I need to dynamically generate links and transfer them to a navLinks object. Despite ensuring that the concatenation is correct, it seems like my approach is not working as expected. Here's a glimpse of what ...

Creating an overlay that dynamically renders components

Trying to create a service that displays a spinner progress while loading, but encountering an error in the console. Here is the service: @Injectable({ providedIn: 'root' }) export class LoadingLockDataService { public message: string; pu ...

Tips for specifying a return type for a DynamoDB fetch using TypeScript?

Currently, I am utilizing the following code snippet: let resItem: Schema resItem = await dynamoClient.get({ TableName, Key: { uuid: request.body.uuid } }).promise() However, the output indicates: The error "Type 'PromiseRe ...

Issue encountered while declaring a variable as a function in TSX

Being new to TS, I encountered an interesting issue. The first code snippet worked without any errors: interface Props { active: boolean error: any // unknown input: any // unknown onActivate: Function onKeyUp: Function onSelect: Function onU ...

Encountering CORS error or POST 400 Bad Request while attempting to upload files on the production server with Apollo-Graphql

I'm encountering difficulties when uploading files to my production server. In the local environment, everything works perfectly as expected. However, when attempting to execute a Mutation that involves file uploads, specifically on those mutations, I ...

Why am I unable to apply the keyof operator from one type to another type, even though both types have identical keys defined but different value types?

Consider this code snippet. I am encountering a TypeScript error specifically on the last compat[k] line with the following error message: Type 'keyof T' cannot be used to index type 'Partial<CompatType>' export type KeysOfType ...

Tips for incorporating null checks into a function in TypeScript

In my code, I have multiple functions that require a null check on an object before proceeding with certain actions or throwing an error if the object is null. Here is an example of what it looks like: interface SomeObject { doThingOne: () => string ...

Maximizing the potential of typescript generics in Reactjs functional components

I have a component within my react project that looks like this: import "./styles.css"; type InputType = "input" | "textarea"; interface ContainerProps { name: string; placeholder: string; as: InputType; } const Conta ...

Attempting to incorporate alert feedback into an Angular application

I am having trouble referencing the value entered in a popup input field for quantity. I have searched through the documentation but haven't found a solution yet. Below is the code snippet from my .ts file: async presentAlert() { const alert = awa ...