DEV Community

Cover image for Angular CLI Install Fails on RxJS
bob.ts
bob.ts

Posted on

4 1

Angular CLI Install Fails on RxJS

In a recent call with a client, they were installing the Angular CLI using information from a Knowledge Training (KT) session I had done.

He used the following command ...



npm install -g @angular/cli


Enter fullscreen mode Exit fullscreen mode

It failed.

The Problem

In examining the logs, we could see that there was a FetchError occurring for https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz ...

Log file showing FetchError

He and I both copy-and-pasted the URL into our browsers. His failed while mine worked.

The assumption is that something on his local network (he was in the office, not at home) was blocking this particular download for some reason.

Failed Attempt

We tried installing the previous version of the Angular CLI. This failed, as well.



npm install -g @angular/cli@12.2.16


Enter fullscreen mode Exit fullscreen mode

My assumption is that it uses the same version of RxJS. We could have gone further back, but tried a different direction instead.

In the logs I noticed the (cache miss) while I assumed meant that npm looked to see if it had already downloaded the file.

The Solution

The next thing we tried was using the copy I retrieved to update his npm cache. I sent him the file and we executed the following command on his terminal.

npm cache add documentation



npm cache add rxjs-6.6.7.tgz


Enter fullscreen mode Exit fullscreen mode

Then we tried the installation again ...



npm install -g @angular/cli


Enter fullscreen mode Exit fullscreen mode

Terminal showing both npm commands run

... and it worked!

AN UPDATE

We saw the same issue with another npm install command and the same process worked. I transferred the file, he added it to the cache, and was able to continue the installation.

It went much faster when we knew what to do ...

Image of AssemblyAI tool

Challenge Submission: SpeechCraft - AI-Powered Speech Analysis for Better Communication

SpeechCraft is an advanced real-time speech analytics platform that transforms spoken words into actionable insights. Using cutting-edge AI technology from AssemblyAI, it provides instant transcription while analyzing multiple dimensions of speech performance.

Read full post

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay