I have multiple npm projects saved in a local directory. Now I want to take backup of my projects without the node_modules folder, as it is taking a lot of space a
node_modules
When on Windows, I use the following .BAT file to delete node_modules recursively from the current folder:
.BAT
@for /d /r . %d in (node_modules) do @if exist %d (echo %d && rd %d /s /q)
Or, via CMD.EXE:
CMD.EXE
cmd.exe /c "@for /d /r . %d in (node_modules) do @if exist %d (echo %d && rd %d /s /q)"