'npm ERR! 404 Not Found - GET https://registry.npmjs.org/error-ex

I am trying to install npm package dependencies in to my angular application and i am getting this error. Any help to fix this?

npm ERR! code E404
npm ERR! 404 Not Found: error-ex@^1.2.0
npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Dilushi\AppData\Roaming\npm-cache\_logs\2020-02-12T13_07_17_602Z-debug.log

I will attach my package.json file here.

{
  "name": "app-pfe",
  "version": "0.0.1",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^6.0.2",
    "@angular/common": "^6.0.2",
    "@angular/compiler": "^6.0.2",
    "@angular/core": "^6.0.2",
    "@angular/forms": "^6.0.2",
    "@angular/http": "^6.0.2",
    "@angular/platform-browser": "^6.0.2",
    "@angular/platform-browser-dynamic": "^6.0.2",
    "@angular/router": "^6.0.2",
    "@ng-dynamic-forms/core": "^6.0.6",
    "@ng-select/ng-select": "^2.18.0",
    "angular-webstorage-service": "^1.0.2",
    "angular2-moment": "^1.9.0",
    "core-js": "^2.5.4",
    "inspector": "^0.5.0",
    "jsrsasign": "^8.0.12",
    "ngx-auth": "^5.0.0",
    "ngx-bootstrap": "^5.0.0",
    "node-sass": "^4.11.0",
    "rxjs": "6.3.3",
    "rxjs-compat": "6.3.3",
    "underscore": "^1.9.1",
    "zone.js": "^0.8.26"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.13.8",
    "@angular-devkit/build-ng-packagr": "~0.6.8",
    "@angular/cli": "~6.0.2",
    "@angular/compiler-cli": "^7.2.14",
    "@angular/language-service": "^6.0.2",
    "@types/jasmine": "~2.8.6",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~8.9.4",
    "codelyzer": "~4.2.1",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "^4.0.1",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~1.4.2",
    "karma-jasmine": "~1.1.1",
    "karma-jasmine-html-reporter": "^0.2.2",
    "ng-packagr": "^5.1.0",
    "protractor": "^5.4.1",
    "ts-node": "~5.0.1",
    "tsickle": ">=0.25.5",
    "tslib": "^1.7.1",
    "tslint": "~5.9.1",
    "typescript": "3.1.1"
  }
}


Solution 1:[1]

Try configuring npm using this npm config set registry https://skimdb.npmjs.com/registry

Solution 2:[2]

I think you triggered wrong command, check spelling of the command npx react-native run-android then it will work.

Solution 3:[3]

enter image description here

100% (solution) : npm set registry https://registry.npmjs.org/

enter image description here

Solution 4:[4]

This should work now. They have fixed it. I have tried it now and working

Solution 5:[5]

Some time your other packages may not compatible with the package that you are going to install via npm

uninstall and reinstall latest Node

that having latest NPM version

Solution 6:[6]

There might be another reason for this issue, kindly check your npm registry config whether it is http://registry.npmjs.org/ and not http://registry.npmjs.org or https://registry.npmjs.org/

Solution 7:[7]

To avoid this error you should run this command

npm init react-app my-app

For more information check this link npm error 404 not Found

Solution 8:[8]

  1. create .npmrc file in your project
  2. then add @foo:registry=https://gitlab.example.com/api/v4/projects/${CI_PROJECT_ID}/packages/npm/

Solution 9:[9]

Almost every developer knows npm, the JavaScript package manager very useful for faster development and for downloading the entire Internet (yes, npm has this fault…)

npm install npm@latest -g

npx create-react-app myapp

Solution 10:[10]

I also had the same problem. To solve I just ran npm install with the root user to fix it. Now it's working.

Sudo su 
npm install 

Solution 11:[11]

I also faced same problem and none of above worked for me!

To solve this issue:

  1. Delete both package.json and package-lock.json files

  2. Then in cmd (go to the correct path of boilerplate-express app) and then use:

    npm init -y
    

    It will create a new package.json file but in that file you must check "main" property, set the "main" property to server.js

  3. And in server.js file, they used var bGround = require('fcc-express-bground'); instead use var bGround = require('fcc-express-background'); and save the file (because in npmjs.com there is no module such as fcc-express-bground but fcc-express-background module is available for boileplate app)

  4. After that install those package modules which are asked.