Category:
javascript
windows
Delete node_modules dir in Windows
You are a happy Windows user. You have just upgraded your nodejs (if you can) and now you have to delete local /node_modules directory to install brand new packages. Problems?
The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters
Yes, Windows can’t delete this directory because of the limitations in system. What now? Don’t worry, NPM comes to the rescue.
Just install Node package rimraf.
> npm install rimraf -g
Move to direcotry above node_modules and execute.
> rimraf node_modules
Tell me how it goes :)