leoh leoh - 8 days ago 7x
Node.js Question

Unable to delete node_modules folder (Windows 7)

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.


Since this the top google result, this is what worked for me:

Install RimRaf:

npm install rimraf -g

And in the project folder delete the node_modules folder with:

rimraf node_modules

[ http://www.nikola-breznjak.com/blog/nodejs/how-to-delete-node_modules-folder-on-windows-machine/ ]