0

I am an absolute beginner in React N/JS. I have been learning from several videos and tried creating an app using the npx create-react-app *app name* . I made the same app before which was running fine, but I started over with the same app after a couple of months and the terminal showed 58 vulnerabilities (16 moderate, 40 high, 2 critical).

At first, I fixed it by running the command npm i --package-lock-only. but then something happened and i had to reinstall VS Code, after which the vulnerabilities reappeared and now neither npm audit fix or npm audit fix --force, nor npm i --package-lock-only is working.

As you can tell my technical terminologies are really weak, but I really hope I am making sense. Would really appreciate it if anyone could suggest me a solution!

  • Does this answer your question? [Npm audit fix --force react script downgrade automatically](https://stackoverflow.com/questions/67693423/npm-audit-fix-force-react-script-downgrade-automatically) – Andrey Nov 11 '21 at 10:22

1 Answers1

0

it causes your node module's version different from your react version. to be sure to see your recommended react version of the installed node module.

  • Hi Sepehr, after seeing your comment i realized that I installed the latest VS Code with the latest React version and installed the Node.JS file from 8 months ago. I ran ```npm audit``` and no more vulnerabilities are shown. But when I go to the app folder and run ```npm audit```, it shows the errors again. Any suggestions? – Faisal S. Abd. Nov 09 '21 at 02:22
  • I had this problem before. I checked my package.json with git and saw that it changed react version and some other node modules. try to reload the project from git or your version controller. my advice is never to use --force commands and audit. if node module not installing, it is not compatible with your project, try another one. – Sepehr Pourjozi Mar 23 '22 at 18:53