skip to Main Content

yesterday I was trying to install echarts-for-react package from npm but it started throwing error:

enter image description here

to double check I also tried creating a react app but create-react-app was also throwing the same error:

enter image description here

I also tried reinstalling node but the error still persist could anyone help me resolve this error 🙂 ?

3

Answers


  1. Chosen as BEST ANSWER
    npm config set registry http://registry.npmjs.org
    

    the above line of code worked :)


  2. Btw are you using private artifactory like JFROG.? Where are you trying to install from? Error looks like you are trying to install from some private artifactory and not the public one and this package does not exist there hence throwing the error. to solve it first of all you need to add this package to your central private artifactory then you can use yarn or npm to install it like any other package you do. in your root directory check the file like .npmrc or .yarnc to see what is your registry url. you will understand where you are trying to install it from. or if it is not set you can create an file .npmrc or .yarnc and set the public registry url. for npm

    //.npmrc

    registry=http://registry.npmjs.org // or your private artifactory

    Login or Signup to reply.
  3. while installing any package if throughs any error use –force in the end of command that will install package force fully e.g : npm install echarts-for-react –force

    For creating new app use => npx create-react-app appName

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search