Upon trying to remove the node_modules directory created by npm install
:
The source file name(s) are larger than is supported by the file system. Try moving to a location which has a shorter path name, or try renaming to shorter name(s) before attempting this operation
I also tried shift + delete and still having the same issue.
Using 'Git Bash' to remove the folder is the simplest way to remove all folders including subfolders in the 'node modules'. It will take a while to delete everything, but it works without any installation.
Clean up node_modules/ folder There are two ways to clean up the node_modules folder: Delete the folder and reinstall. Use npm prune (starting with npm version 6)
Node Modules Global installs on Unix systems go to {prefix}/lib/node_modules . Global installs on Windows go to {prefix}/node_modules (that is, no lib folder.)
If you're sure you want to delete the entire cache, rerun this command with --force. So if you get that error, try running npm cache verify . If that doesn't solve your problem, you can also try deleting the node_modules folder in your project and re-running npm install .
Since this the top google result, this is what worked for me:
Update, if you have npm v5, use npx:
npx rimraf ./**/node_modules
Otherwise install RimRaf:
npm install rimraf -g
And in the project folder delete the node_modules folder with:
rimraf node_modules
If you want to recursively delete:
rimraf .\**\node_modules
[ http://www.nikola-breznjak.com/blog/nodejs/how-to-delete-node_modules-folder-on-windows-machine/ ]
I've simply done that by using Winrar, this may seem a strange solution but working very well.
node_modules
folderAdd to archive ...
from the menu.delete files after archiving
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With