Issue with Angular 8: ng lint error - Reached maximum call stack size limit

I am facing an issue with linting my project. When I run "ng lint," I encounter the following error:

$ ng lint
Linting "app"...
An unhandled exception occurred: Maximum call stack size exceeded
See "C:\Users\6100BR~1\AppData\Local\Temp\ng-owDTzM\angular-errors.log" for further details.
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Interestingly, everything runs smoothly when I try to run or build the application.

Version Information:

  • "@angular-builders/custom-webpack": "^8.2.0",
  • "@angular-devkit/build-angular": "^0.800.0",
  • "@angular/cli": "^8.0.0",
  • "@angular/compiler": "^8.0.0",
  • "@angular/compiler-cli": "^8.0.0",
  • "@angular/core": "^8.0.0",
  • "@angular/flex-layout": "^8.0.0-beta",
  • "@angular/language-service": "^8.0.0",
  • "@fullcalendar/angular": "^4.3.1",
  • "@fullcalendar/core": "^4.3.1",
  • "@fullcalendar/daygrid": "^4.3.0",
  • "@fullcalendar/list": "^4.3.0",
  • "@fullcalendar/timegrid": "^4.3.0",
  • "@types/jquery": "^3.3.33",
  • "angular-resizable-element": "^3.2.6",
  • "jquery": "^3.4.1",
  • "rxjs": "^6.5.0",
  • "sass": "^1.23.0",
  • "typescript": "~3.4.0",
  • "webpack-bundle-analyzer": "^3.6.0",
  • "zone.js": "~0.9.0"

Any suggestions on how to troubleshoot this issue or improve the error message clarity?

Answer №1

To insert a script into the package.json file, follow this format:

"scripts": {
    "lint": "node --max_old_space_size=8192 --harmony node_modules/@angular/cli/bin/ng lint"
}

Then, run the command:

npm run lint

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

Is Redux or Flux the default state management tool used in React?

After using npx create-react-app my-app --template typescript to create a new React app, what is the default software architecture (MVC, Redux, or Flux)? I've been researching the differences between them and it has left me feeling a bit confused. I w ...

Utilizing a monorepo approach enables the inclusion of all *.d.ts files

Scenario: In our monorepo, we have 2 workspaces: foo and bar. foo contains the following files: src/file.ts src/@types/baz.d.ts The bar workspace is importing @monorepo/foo/src/file. While type-checking works for the foo workspace, it does not work fo ...

The constant LOCALE_ID is always set to en-US and remains unchanged

app.module.ts import { registerLocaleData } from '@angular/common'; import localeIndia from '@angular/common/locales/en-IN'; import additionalLocaleIndia from '@angular/common/locales/extra/en-IN'; registerLocaleData(localeInd ...

arranging data in html table columns using angular 2

I am facing a challenge where I require each column of a table to be sorted in ascending order every time it is clicked. The sorting logic implemented is a standard JavaScript method. While this method works well in most scenarios, it encounters issues whe ...

Can't figure out why the BackgroundImage URL from process.env isn't appearing on my website

Having trouble setting a background image on my website that connects with my backend to determine which image should appear. However, in some cases, the image isn't showing up. When attempting to add a background image using the code below within a ...

The Function-supported Operation is having trouble implementing a modification related to Geohash/Geopoint - the Object Type requires a String format

Summary: My function-based Action that tries to set a GeoPoint as a Geohash property is failing with an error suggesting it was anticipating a string. I have an Object Type with a String property that has been designated as a Geohash in the property edito ...

What are the optimal strategies for managing various components within an Angular (2) Web application?

I am seeking advice on Angular 2+ Webapps and have a few questions. What is the recommended approach for managing a publicly available info page, an authentication page, and a protected page for signed-in users? Should I consider separate Angular Apps ...

Highlighting in Coda on MacOS now supports TypeScript

Can anyone help me with getting my Coda editor to properly highlight TypeScript? I checked this page and it says that TypeScript is supported: But in my up-to-date version of Coda, the list of supported languages seems different. Is there a way to make Ty ...

Display changes in the Angular UI when the cache is refreshed following the API request

Currently, I have integrated Angular service worker to cache my API responses. The configuration used for caching the API is as follows: "dataGroups":[ { "name":"services", "urls":[ "apiUrl" ], ...

Custom HTML binding in expanding rows of Angular 2 DataTables

I am currently working on implementing a data table feature that allows for an extended child row to be displayed when clicking the + icon. This row will show additional data along with some buttons that are bound via AJAX before transitioning to Angular 2 ...

PhpStorm flawlessly detects ES7 type hinting errors

For my project, I have implemented TypeScript. While JavaScript's array includes() function has been valid since ECMA6, setting the lib parameter in tsconfig to "es6" results in a non-fatal error being thrown in the browser console when using the foll ...

Is the Angular custom validator failing to trigger if the input is left untouched?

My form setup is as follows: this.form = this.formBuilder.group({ name: ['', Validators.required], email: ['', this.customValidator()] }); I have a button labeled "submit" with a condition for disabling: <button [disabled]=" ...

Is there a way to refresh the list automatically after deleting an item using Firebase?

When I use ngFor on a list to display multiple recordings in a table, I have two methods in my TypeScript file - one for getAll and another for delete, as shown below: HTML: <tr *ngFor="let value of imagesList"> <td scope="row& ...

How do I select all checkboxes in TypeScript when I only click on one of them?

I'm currently working with a list of checkboxes in my HTML code: <div class="col-sm-12" *ngIf="ControllerModel"> <div *ngFor="let controller of ControllerModel" class="panel col-md-6 col-lg-6 col-xs-6"> <div class="panel-heading" ...

webpack is failing to load SVG files

My application structure includes: /webapp /lib /assets ic_add_black_24px.svg ic_clear_black_24px.svg .. .. The configuration in my webpack.config.js looks like this: var path = require('path'), webpack = requ ...

What is the best way to link assets within an Angular custom element (Web Components)?

After successfully creating a web component and referencing an image from my asset folder, everything was running smoothly on my local environment. However, when I published my custom element to Firebase hosting, I encountered some issues. When trying to ...

Is it possible to utilize webpack on the client-side without the need for a Node.js server?

I am currently working on a web application project where I plan to store all HTML, JavaScript, and CSS files on Amazon S3. My goal is to communicate with a RESTful server through an API. I am aiming to implement lazy loading, and potentially utilize rout ...

Should an HTML canvas in Angular be classified as a Component or a Service?

I have a basic drawing application that uses an MVC framework in TypeScript, and I am looking to migrate it to Angular. The current setup includes a Model for data handling, a View for rendering shapes on the canvas, and a Controller to manage interactio ...

CSS disappears unexpectedly on React/Webpack website

I'm currently in the process of developing a website using React, Node, Express, Webpack, and Material-UI. I seem to be encountering an issue related to JSS. While running 'run dev' seems to work fine, once I build the project and click on ...

Adjusting the height of an Angular CDK virtual scroll viewport based on dynamic needs

Currently, I am developing an Angular table with the cdk Virtual Scroll feature. Is there a method to adjust the scroll viewport's height dynamically? While the standard style property works, I am encountering difficulties setting the value using ngSt ...