npm-installrevert

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


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.