The windows version will take a while as it looks at every file. If you just want to blast it, using robocopy is a good solution.
$ robocopy c:/someemptydir c:/path-to-node_modules /MIR > NUL
This method also gets you round the windows long file name problem that you often come across here.
Won’t this delete everything, and not just the node_modules themselves ? I’ll have to give it a try ! I saw someone else post this as well:
robocopy EMPTY_FOLDER node_modules /mir
It’ll delete everything under the destination path. Syntax is:
Robocopy <source> <destination> /MIR
With a redirect to null to remove output.
I’m not a node dev but devops who has to regularly remove these things from build slaves. Obviously there’s a cost on next build re-downloading.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The windows version will take a while as it looks at every file. If you just want to blast it, using robocopy is a good solution.
This method also gets you round the windows long file name problem that you often come across here.
Won’t this delete everything, and not just the node_modules themselves ? I’ll have to give it a try ! I saw someone else post this as well:
robocopy EMPTY_FOLDER node_modules /mir
It’ll delete everything under the destination path. Syntax is:
With a redirect to null to remove output.
I’m not a node dev but devops who has to regularly remove these things from build slaves. Obviously there’s a cost on next build re-downloading.