During the ng build process, an error is encountered stating, "Cannot read the property 'kind' of undefined."

Currently, I am working on a project that requires me to utilize ng build --prod in order to build a client. However, each time I run ng build --prod, I encounter the same persistent error message:

ERROR in Cannot read property 'kind' of undefined

This issue has been recurring without resolution despite my efforts over the course of nearly a week and extensive searches for potential solutions. I have included a link to the GitHub repository of the client in hopes that someone may be able to identify and rectify this error. To proceed, simply perform a npm install within the Cube folder after downloading it, followed by running ng build --prod. I remain optimistic that a solution can be easily identified and implemented.

For access to the client installation via GitHub, please visit:

https://github.com/detis46901/Cube.git

UPDATE 1: I have consulted various resources on StackOverflow, including the one referenced in the comment below (TypeError: Cannot read property 'kind' of undefined at getAssignmentTargetKind). Unfortunately, these suggested solutions have not proven effective thus far.

Answer №1

After some investigation, I managed to uncover the solution. The key was to make adjustments in the tsconfig.json file.

Within the

"angularCompilerOptions"
section, I made sure to include "enableIvy": false.

I also updated the "lib" section by adding both "ES2020" and "ESNext".

Following these changes, I proceeded to execute the commands rm ./node_modules/ and then npm i. Additionally, I had to install specific versions of typescript and angular packages.

npm install <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f88c81889d8b9b8a91888cb8cbd6ce">[email protected]</a>
npm install @angular-devkit/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="dfbdaab6b3abf2beb1b8aab3bead9feff1e6efeef1e6">[email protected]</a>
npm install @angular/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a9cac6dbcce9908798879d">[email protected]</a> @angular/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b1d0dfd8dcd0c5d8dedfc2f1889f809f85">[email protected]</a> @angular/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a0c3cfcdcdcfcee0998e918e94">[email protected]</a> @angular/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="99fff6ebf4ead9a0b7a8b7ad">[email protected]</a> @angular/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="3c4c505d485a534e51115e4e534b4f594e7c05120d1208">[email protected]</a> @angular/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e5978a90918097a5dccbd4cbd1">[email protected]</a> @angular/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b7c7dbd6c3d1d8c5da9ad5c5d8c0c4d2c59ad3ced9d6daded4f78e99869983">[email protected]</a> @angular/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="1675797b667f7a7364562f38273822">[email protected]</a> @angular/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="dbb8b4b6abb2b7bea9f6b8b7b29be2f5eaf5ef">[email protected]</a> @angular/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c7aba6a9a0b2a6a0a2eab4a2b5b1aea4a287fee9f6e9f3">[email protected]</a>

Implementing these modifications enabled me to successfully run ng build for the client application. I plan to notify the original repository owner about these necessary changes to enhance the usability of the program.

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

The $mdSticky feature in AngularJS Material seems to be malfunctioning

It's been a challenge for me to get the md-toolbar to stay in the top position. I decided to create a custom directive using the $mdSticky service in AngularJS. var app=angular.module('app',['ngMaterial']); app.controller(&apos ...

Updating components in Angular4 when route changesHow to update components on route

How can I ensure my component updates when the route changes? Here is the code for my component : import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { ListService } from '.. ...

Encountering an issue during the registration of reducers with ActionReducerMap: "does not match the type 'ActionReducerMap<AppState, Action>'"

Here is a simplified version of my Angular 5 application. I have a reducer that needs to be registered in the root module. The problem arises in LINE A where I encounter the following error: ERROR in src/app/store/app.reducers.ts(7,14): error TS2322: Type ...

Is it really necessary to still think poorly of JavaScript in 2011?

Here's an intriguing question for you. I've tested out a variety of popular websites, including Facebook, and I've noticed that many features still work perfectly fine even when JavaScript is disabled. People always used to say that JavaScr ...

encountering a loading issue with angular2-modal in rc1 version

Currently, I am implementing a library called angular2-modal. This library offers various modal options including bootstrap and vex for angular 2. While vex is functioning properly, I encounter an error when switching to bootstrap: responsive-applicati ...

Memory leaks are occurring due to the texture from the video tag

Currently, I am working on creating a texture in THREE.js (r78) from a video tag and updating the texture 60 times per second by setting needsupdate=true in requestanimationframe. However, I am facing a problem where I notice memory leakage in the Chrome T ...

Running the command Yarn build with Vite.js and React.js is encountering issues and is not functioning properly

Lately, I've been experimenting with Vite in my React projects. However, when I execute the command yarn build, it creates a Build folder but the application fails to work. When I open the index.html file, all I see is a blank page. Interestingly, e ...

Retrieve data from a list using an API

I am currently working on creating a dynamic list by fetching data from an API. The goal is to display detailed information in a modal when a user clicks on a specific item in the list. While the list itself is functioning properly, I am encountering an i ...

React - Why does the screen sometimes flash white after server rendering?

While working on server rendering in React JS during development, I successfully achieved the same checksum between the server render and client render. Despite the client render being identical to the server render, there is a noticeable white flash on ...

Is the detailedDescription missing from the JSON-LD schema crawl?

I am currently utilizing the Google Knowledge Graph Search (kgsearch) API to retrieve Schemas from schema.org. However, I am encountering an issue where some nested elements are not being recognized as JSON or I may be overlooking something... url = "http ...

Declaratively assign ambient typings to an unfamiliar object in Typescript

I am facing an issue with an external library named "gapi" that is set to a property on the window object as window.gapi. I would like to keep it there while using the @types/gapi declaration. Is there a way to achieve this, like the following code snippet ...

How can I safeguard my HTML and CSS content from being altered using tools similar to Firebug?

Is there a method to deter the alteration of HTML and CSS components on a webpage using tools similar to Firebug? I have noticed that certain users are changing values in hidden fields and modifying content embedded within div or span tags for their perso ...

Updating Bootstrap Indicators with jQuery on Click Event

Unfortunately, I am unable to share an image due to limited internet data. My goal is to switch each image to its sprite equivalent. There are three list items that I'm struggling to change because they each have two classes that need to be updated. ...

What is the proper way to transfer data to PHP using AJAX?

I'm facing an issue while trying to send FormData to a PHP file. When I press submit, nothing happens. However, when I send data separately, it works fine. <form method="post" class="code_form" enctype="multipart/form-data& ...

What is the purpose of these specific Javascript expressions (+!)?

Currently, I am attempting to convert JavaScript code into Python. One of the challenges I am facing is understanding the purpose of certain expressions, which has left me feeling stuck. Below is the segment of code that I am trying to translate. va ...

Using JSDoc to Include TypeScript Definitions

I've been attempting to utilize the ts-xor package, which provides a TypeScript definition: export declare type XOR<T, U> = (T | U) extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U; This is how I'm imp ...

Tips for ensuring your jQuery events always trigger reliably: [Issues with hover callback not being fired]

My background image animation relies on the hover callback to return to its original state. However, when I quickly move the mouse over the links, the hovered state sticks. I suspect that I am moving the mouse off before the first animation completes, caus ...

Trouble with passing the function variable to setState efficiently

Although I haven't worked with React for a while, it seems like this issue is more related to plain JS. Here is the setState function that I am using: // click event on parent for performance reasons ``Component:`` const [active, setActive] = useSta ...

Encountering a Typescript issue while utilizing day classes from Mui pickers

Recently, I encountered an issue with my code that alters the selected day on a Mui datepicker. I came across a helpful solution in this discussion thread: MUI - Change specific day color in DatePicker. Although the solution worked perfectly before, afte ...

Tips for accessing and displaying JSON data using jQuery

Data in JSON format: [ { "ID":"25", "Serial":"1", "Purchase_id":"8", "Item":"23", "Unit":"1", "HSN":"84212120", "Quantity":"10", "Purchase_rate":"100", ...