[FIXED] what does "npm add . " will do and how to revert back ? I mistakenly did that instead of git add

Issue

I did npm add . (there’s a space after add and then a fullstop)
how do i revert back? i wanted to do git add .

Solution

The most cleaner way is to:

  1. Remove the package/s from the package.json, you might need to compare your local file with file in base.

  2. Delete the node_modules folder

  3. Run npm install again

Another alternative is to run npm remove but if you did not get many new packages. Anyways my vote for the steps above.

Answered By – jmvcollaborator

Answer Checked By – Timothy Miller (Easybugfix Admin)

Leave a Reply

(*) Required, Your email will not be published