No matching version found for @babel/traverse@^7.14.0

Viewed 9017

I tried to clone a project and run npm install and came across with this error

npm ERR! code ETARGET
npm ERR! notarget No matching version found for @babel/traverse@^7.14.0.
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 '@babel/helper-module-transforms'
npm ERR! notarget

I already googled and find some answers to myself where a user having problem with babel modules and the owner redirected it to here: https://gist.github.com/hzoo/df94af2d2ec48696e683b772c775aa67

We use a proxy for our company npm package though I removed it from package json for testing whether the issue was about that but still got the same problem

npm cache clean --force
npm cache verify
npm config rm proxy
npm config rm https-proxy

but no luck

Here is my package.json

{
  "dependencies": {
    "@fortawesome/fontawesome-free": "^5.15.3",
    "@testing-library/react": "^11.2.5",
    "@testing-library/user-event": "^12.8.3",
    "@types/node": "^12.20.6",
    "@types/react": "^17.0.3",
    "@types/react-dom": "^17.0.3",
    "eslint-config-react-app": "^6.0.0",
    "eslint-config-react-app-tsc": "^6.0.0-rc.1",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-facebook": "^8.1.4",
    "react-router-dom": "^5.2.0",
    "react-scripts": "4.0.3",
    "react-slick": "^0.28.1",
    "react-twitter-embed": "^3.0.3",
    "reactjs-popup": "^2.0.4",
    "sp-rest-proxy": "^3.0.5",
    "typescript": "^4.2.4",
    "web-vitals": "^1.1.1"
  },
  "scripts": {
    "server": "node server.js",
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": [
      "react-app"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "devDependencies": {
    "@types/jquery": "^3.5.5",
    "@types/react-router-dom": "^5.1.7",
    "@types/react-slick": "^0.23.4",
    "bootstrap": "^4.6.0",
    "eslint-config-react": "^1.1.7",
    "jquery": "^3.6.0",
    "popper.js": "^1.16.1",
    "react-app": "^1.1.2"
  }
}
3 Answers

I ran npm doctor to see what is wrong and realized that I couldn't remove my registry so doctor said I should have set the registry to https://registry.npmjs.org/, though I had .npmrc file and it replenished. After deleting that installation continued although package that came from our company couldn't, that is an another issue to solve

set this npm config set registry=https://registry.npmjs.org/ and install npm

This happens because of that version was published yesterday on NPM registry but ur companies registry is not up to date.

SOLUTION: open '.npmrc' which is located in your root. Comment out ur first registry like this:

# registry=http://*******/*******/*****/

and add this:

registry=https://registry.npmjs.org/

install that package version you need and chnage back these 'registry' lines

Related