Angular encounters an issue with the message "Symbolic link could not be followed"

I am facing difficulties in building Angular (version 6) after upgrading node modules. The error message that I encounter is:

Failed to capture fingerprint of output files for task ':pbr-angular-common:setupAngular' property '$1' during up-to-date check.

Could not list contents of '/Users/xxx/git/xxx/angular-common/node_modules/@angular-devkit/build-angular/node_modules/.bin/node-gyp'. Couldn't follow symbolic link.

Here are the steps I have taken to resolve the issue:

  1. Removed folders from .bin directory
  2. Deleted .bin folder entirely
  3. Uninstalled and reinstalled node_modules as per instructions in this link: [How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X)
  4. Removed symbolic links as suggested in this link: [https://github.com/srs/gradle-node-plugin/issues/202][2]
  5. Cleared npm cache using 'npm clean cache'
  6. Emptied .gradle directory (including gradle nodejs cache)
  7. Executed 'gradlew clean build re deploy'
  8. Performed 'brew uninstall node', 'brew install node', 'brew unlink node && link node'

Below are the versions of nodejs and npm that I am currently running:

npm --version
6.11.3
node --version
v12.11.1

I am using MacOS Mojave version 10.14.5. Kindly provide guidance on how to resolve this issue.

Answer №1

During the application build process, I encountered an error that persisted even after attempting 'rm -rf node_modules && npm i'.

The issue was traced back to using node version 12.

To resolve the issue, I executed the following commands:

sudo npm cache clean -f
sudo npm install -g n
sudo n 10.9.0

Ultimately, downgrading my node version resolved the problem.

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

Observables and the categorization of response data

Understanding Observables can be a bit tricky for me at times, leading to some confusion. Let's say we are subscribing to getData in order to retrieve JSON data asynchronously: this.getData(id) .subscribe(res => { console.log(data.ite ...

Tips for dynamically altering the bound variable in Angular

Most people understand the concept of interpolation and how to interpolate a single variable with ease. However, what if we need to dynamically switch between two different variables? Let's say we have two class properties: public first: string = &ap ...

Error message saying "Firebase not defined after Ember CLI installation using npm"

After completing the necessary steps in the command line to set up Ember CLI, Firebase, and EmberFire using node, I encountered an issue where Firebase is not defined in app/adapter/application.js npm install -g ember-cli npm install -g bower npm instal ...

Access the Angular Universal application through a link without specifying a port number

After creating my Angular Universal application, I'm facing an issue where I can only start it by adding the site.com:4000 port to the address. Is there a way to configure it to open without specifying a port? Any guidance on what needs to be done wou ...

"Explore the possibilities of showcasing your JSON data in a visually striking way with the Chart

Just starting out with chartjs and looking to create some charts using JSON data. I have the following JSON array that I want to display in a chart similar to this Sample Image. Any help would be appreciated! [ { "ChartGroupName": ...

How can I apply concatMap in Angular?

Can you please guide me on how to effectively utilize concatMap with getPrices() and getDetails()? export class HistoricalPricesComponent implements OnInit, OnDestroy { private unsubscribe$ = new Subject < void > (); infoTitle ...

Is there a way to verify the availability of an NPM package name?

In the past, I would verify package name availability by visiting https://www.npmjs.com/package/<name>. Unfortunately, this method no longer works due to NPM's detection of similar-name conflicts. Are there any alternative methods for checking ...

What is the best way to loop through an object while keeping track of its value types

I have a JSON file containing UI adjustments sourced from the API: interface UIAdjustmentsJSON { logoSize: number; themeColor: string; isFullScreen: boolean; } To simplify things, let's utilize a static object: const adjustments: UIAdjust ...

TypeScript focuses on checking the type of variables rather than their instance

Is there a way to pass a type (not an instance) as a parameter, with the condition that the type must be an extension of a specific base type? For example abstract class Shape { } class Circle extends Shape { } class Rectangle extends Shape { } class ...

Consistentize Column Titles in Uploaded Excel Spreadsheet

I have a friend who takes customer orders, and these customers are required to submit an excel sheet with specific fields such as item, description, brand, quantity, etc. However, the challenge arises when these sheets do not consistently use the same colu ...

What is the correct way to implement fetch in a React/Redux/TS application?

Currently, I am developing an application using React, Redux, and TypeScript. I have encountered an issue with Promises and TypeScript. Can you assist me in type-defining functions/Promises? An API call returns a list of post IDs like [1, 2, ..., 1000]. I ...

Preventing errors caused by undefined array elements with a type guard

TSC throws an error that is inserted as a comment into the code. tsconfig: "noUncheckedIndexedAccess": true type Tfactors = [number, number, number, number]; export default function changeEnough(pocket: Tfactors, bill: number): boolean { cons ...

What is the reason for a boolean extracted from a union type showing that it is not equivalent to true?

I'm facing a general understanding issue with this problem. While it seems to stem from material-ui, I suspect it's actually more of a typescript issue in general. Despite my attempts, I couldn't replicate the problem with my own types, so I ...

Launching a MEAN stack application on Heroku

My current challenge involves deploying an application I have developed using the MEAN stack on Heroku. The issue seems to be related to the structure of my application. All server-side code is contained in a directory named 'server', which inclu ...

Troubleshooting radio name input binding in Angular 2

In Angular2, there seems to be an issue with one-way binding to the name attribute for a group of radio inputs. For example: <div [ngFormModel]="form"> <input type="radio" [name]="varName" [id]="id1" ngControl="r1"> <input type="radio" ...

Leveraging *ngIf in conjunction with routerLink

How can I apply "ngIf" to a routerLink instead of using a button? For example: *ngIf="auth.isAuthenticated()" (click)="auth.logout()" Using: <a [routerLink]="['/']">Logout ...

Angular - Implementing filter functionality for an array of objects based on multiple dropdown selections

I am currently working on filtering an array of objects based on four fields from a form. These four fields can be combined for more specific filtering. The four fields consist of two dropdowns with multiple selection options and two text boxes. Upon cli ...

When a function is transferred from a parent component to a child component's Input() property, losing context is a common issue

I have encountered an issue while passing a function from the parent component to the child component's Input() property. The problem arises when the parent's function is called within the child component, causing the this keyword to refer to th ...

Using Vue components in a TypeScript file

I recently started using Vue.js with TypeScript and stumbled upon this GitHub repository. While working on it, I encountered an issue where I received an error while trying to import a Vue Single Component File from TypeScript. My development environment ...

Defining TypeScript type annotations: the art of declaring class constructors

I've developed my own JavaScript library (consisting of a single js file) with multiple classes. To incorporate it into my TypeScript projects, I created a d.ts file containing type definitions for each class. An example of the definition would be: ex ...