Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React NPM inefficient regular expression complexity in nth-check

Tags:

npm

reactjs

enter image description here

I googled lot about this issue. But could not find this issue belongs to which library? How to fix it? any help will be appreciated

like image 244
karthi Avatar asked Sep 14 '25 21:09

karthi


2 Answers

This is a known issue, and it should not affect your actual app as it's coming from react-scripts package.

Open package.json. You will find this:

  "dependencies": {
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-scripts": "4.0.3"
  }

Take react-scripts and move it to devDependencies (if you don't have it, create it):

  "dependencies": {
    "react": "^17.0.2",
    "react-dom": "^17.0.2"
  },
  "devDependencies": {
    "react-scripts": "4.0.3"
  },

Then, ensure you run npm audit --production rather than npm audit.

You can read more from official sources: https://github.com/facebook/create-react-app/issues/11174#issuecomment-979449264

like image 121
rarara Avatar answered Sep 16 '25 13:09

rarara


"resolutions" :{
 "nth-check":"2.0.1"
}

Add it in Package.json then run npm install

like image 33
karthi Avatar answered Sep 16 '25 12:09

karthi