Having trouble installing Angular CLI using npm command

After diligently following the steps outlined in the documentation here to install the Angular CLI, I encountered an issue.

Upon running the command $ npm install -g @angular/cli in an empty directory, I was met with the following error message:

npm ERR! code ETARGET
npm ERR! notarget No matching version found for semver@^7.3.5.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget 
npm ERR! notarget It was specified as a dependency of '@npmcli/git'
npm ERR! notarget 

npm ERR! A complete log of this run can be found in:
npm ERR!     ~/.npm/_logs/2021-06-11T14_50_50_128Z-debug.log

Despite facing this error, it seems that semver 7.3.5 is available here.

I am confused about the cause of this error. Can anyone provide some insight?

$ node -v
v14.16.1
$ npm -v
6.14.12
$ cat ~
283 verbose stack semver: No matching version found for semver@^7.3.5.
283 verbose stack     at pickManifest (~/node-v14.16.1-linux-x64/lib/node_modules/npm/node_modules/npm-pick-manifest/index.js:122:13)
283 verbose stack     at ~/node-v14.16.1-linux-x64/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/manifest.js:24:14
283 verbose stack     at tryCatcher (~/node-v14.16.1-linux-x64/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
283 verbose stack     at Promise._settlePromiseFromHandler (~/node-v14.16.1-linux-x64/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:517:31)
283 verbose stack     at Promise._settlePromise (~/node-v14.16.1-linux-x64/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:574:18)
283 verbose stack     at Promise._settlePromiseCtx (~/node-v14.16.1-linux-x64/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:611:10)
283 verbose stack     at _drainQueueStep (~/node-v14.16.1-linux-x64/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:142:12)
283 verbose stack     at _drainQueue (~/node-v14.16.1-linux-x64/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:131:9)
283 verbose stack     at Async._drainQueues (~/node-v14.16.1-linux-x64/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:147:5)
283 verbose stack     at Immediate.Async.drainQueues [as _onImmediate] (~/node-v14.16.1-linux-x64/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:17:14)
283 verbose stack     at processImmediate (internal/timers.js:461:21)
284 verbose cwd ~/tevc/manufacture-poc/manufacturer-angular
285 verbose Linux 4.4.0-210-generic
286 verbose argv "~/node-v14.16.1-linux-x64/bin/node" "~/node-v14.16.1-linux-x64/bin/npm" "install" "-g" "@angular/cli"
287 verbose node v14.16.1
288 verbose npm  v6.14.12
289 error code ETARGET
290 error notarget No matching version found for semver@^7.3.5.
291 error notarget In most cases you or one of your dependencies are requesting
291 error notarget a package version that doesn't exist.
291 error notarget
291 error notarget It was specified as a dependency of '@npmcli/git'
292 verbose exit [ 1, true ]

EDIT

It's worth noting that I use a custom npm registry.

Answer №1

In order to successfully install @angular/cli, I had to remove a custom registry that was defined in my ~/.npmrc

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

Encountering an error when attempting to add the 'shelljs' module to an Angular 2 TypeScript project

I am facing an issue with including the shelljs library in my Angular 2 TypeScript project. I have already added the shelljs.d.ts file to the node_modules/shelljs directory. Below is my package.json configuration: "name": "myproj1", "description": "myp ...

include the npm directory in your PATH variable

Attempting to install Cordova is underway. Progress seems promising so far. The command used in the terminal was sudo npm install -g cordova. This was the resulting output: /usr/local/bin/cordova -> /usr/local/lib/node_modules/cordova/bin/cordova < ...

The search is on for the elusive object that Angular 2/4

Why am I encountering the error message saying "Cannot find name 'object'"? The error message is: Error: core.service.ts (19,23): Cannot find name 'object'. This error occurs in the following line of code: userChange: Subject<ob ...

Where specifically in the code should I be looking for instances of undefined values?

One method in the codebase product$!: Observable<Product>; getProduct(): void { this.product$ = this.route.params .pipe( switchMap( params => { return this.productServ.getById(params['id']) })) } returns an ...

I encountered an npm install error while attempting to host my React website on Netlify

Running the npm run build command locally and uploading the build folder to Netlify results in successful hosting but triggers a significant error: While attempting continuous deployment from my GitHub repository, I encountered the following error at the ...

Using Angular 4 with Semantic-UI for Dropdown menus

Currently, I am in the process of implementing an Angular directive to handle Semantic UI dropdown. My setup includes Angular (4.3.3), jQuery (3.2.1), and Semantic UI (2.2.13) installed via npm. To make these libraries work together, I made modifications ...

What are some techniques for streamlining this code with Typescript?

I am currently working with the following code snippet: let doNavigate = this.currentScreen === removedFqn; if (doNavigate) { location.reload(); } Does anyone have any suggestions on how I can simplify this code using Typescript? ...

"Customize your Angular application by updating the background with a specified URL

Hello there, I've been attempting to modify the background URL once a button is clicked. In my CSS, I have the following default style set up. .whole-container { background: linear-gradient( rgba(0, 0, 0, 2.5), ...

Guide on implementing ES6 script's template literals

I've been tackling a template literal question on hackerrank. It's working smoothly on my local IDE, but encountering an error on the Hackerrank IDE. Here's the code to add two numbers and print the result using a template literal: const sum ...

Passport - Recording User Information and Processing Access Details

Currently, I am using Node/Express/Passport for user registration on my website and Mongoose to save the data. The main goal is to allow a non-logged-in person to answer questions (with answers stored in variables) and then proceed to register a new accoun ...

npm is reporting an error message of "UNABLE_TO_GET_ISSUER_CERT_LOCALLY",

Currently utilizing Amazon Linux on AWS EC2, running npm version 1.3.6 and node version 0.10.42 (though outdated, upgrading is not a risk I can take at the moment). It should be noted that there exists no proxy between this machine and the internet. Upon ...

"Improve text visibility on your website with Google PageSpeed's 'Ensure text remains visible' feature, potentially saving you

Click here for the image reference showing the 0ms potential saving message I'm having trouble with a warning in Google PageSpeed and I've tried everything. This is the code I'm using to define the font-family: @font-face { font-family: ...

There seems to be a hiccup in the distribution build of Angular grunt, as it is unable to locate the

While testing the build, everything runs smoothly. However, when attempting to build the distribution, an error is encountered: An error occurred: Cannot find module '/Users/matt.sich/Documents/angularProjects/firstProject/node_modules/grunt-usemin/l ...

Using ngFormModel with Ionic 2

How can I properly bind ngFormModal in my Ionic 2 project? I am facing an issue while trying to import it on my page, resulting in the following error message: Uncaught (in promise): Template parse errors: Can't bind to 'ngFormModel' since ...

find all the possible combinations of elements from multiple arrays

I have a set of N arrays that contain objects with the same keys. arr[ {values:val1,names:someName},   {values:val2,names:otherName}, ] arr2[   {values:valx,names:someNamex}, {values:valy,names:otherNamey}, ] My goal is to combine all possible c ...

Unable to locate element in the DOM using XPath

Having trouble retrieving an element from the DOM using XPath <input bsdatepicker="" class="form-control font-size-normal ng-untouched ng-pristine ng-valid" id="endDate" name="endDate" placement="top" type="text"> The value of the element is not p ...

Use PipeTransform to apply multiple filters simultaneously

Is it possible to apply multiple filters with PipeTransform? I attempted the following: posts; postss; transform(items: any[]): any[] { if (items && items.length) this.posts = items.filter(it => it.library = it.library ...

Executing the routing component prior to any other tasks

Having an issue where the ProductsService is fetching data from the server and storing it in an Array. The ProductsComponent serves as the parent component, while the ProductsListComponent and ProductListItemsComponent are its children components. The flow ...

Loader for dynamically loading tabs in Angular 2

I am looking to develop a dynamic tabs loader using Angular 2 material with specific syntax support. <generic-tabs [tabs]="tabs" tabVisibleField="name"> <test-cmp [tabContent] testData="hello"></test-cmp> ...

Leverage NPM to download and set up a codebase for your development needs

When using npm install foo, the result is: foo being installed to ./node_modules/foo No version control repository. However, it would be more convenient if NPM could detect the version control repository location and allow us to execute npm start-dev fo ...