DEV Community

Discussion on: NPM AUDIT FIX RUINED MY REACT NATIVE PROJECT

Collapse
 
perkinsjr profile image
James Perkins

Did you check in the code? Because then you can revert to the commit prior to the one you made the changes to.

Collapse
 
aore profile image
Emmanuel Oreoluwa

If I discard changes in my source control will that fix it

Collapse
 
perkinsjr profile image
James Perkins

If you discard to before you started and then clean the node_modules folder and then run npm install and then run your project you should be fine.

Thread Thread
 
aore profile image
Emmanuel Oreoluwa

Thank you I will try it
And see if this works

Collapse
 
aore profile image
Emmanuel Oreoluwa

how do i clean node modules

Collapse
 
perkinsjr profile image
James Perkins

just delete the node_modules folder.

Thread Thread
 
aore profile image
Emmanuel Oreoluwa

I already ran npm install should I still go on and delete the folder

Thread Thread
 
zerdnelemo profile image
zerdnelemo

In order to clean node_modules you need to execute 2 steps:
1) rm -rf node_modules/
2) npm i

Step 1) removes node_modules folder with all its content from the app
Step 2) re-installs all packages specified in package.json file

Now your app will have a clean node_modules folder with just the needed packages installed.

Collapse
 
aore profile image
Emmanuel Oreoluwa

Thank you It worked

Collapse
 
perkinsjr profile image
James Perkins

Glad it worked