leoh leoh - 5 months ago 29
Node.js Question

unable to delete node_modules folder

I was trying to remove the node_modules directory, created by

npm install
, on windows 7 and I got the following message

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. Any suggestion is much appreciated.


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/ ]