Deleting longer path using rimraf

The npm packages gets installed locally in node_modules folder. On trying to deleted the folder you will get a message saying “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

This happens because of the nesting of folders.

To delete this successfully you can use RimRaf.

Install RimRaf globally in your system.
npm install -g rimraf

Now go the directory for which you want to remove the node_modules in command prompt and run the below command.
rimraf node_modules

You can do this for deleting any longer folder path.

By Vivin Antony

Here I write mostly about software, technology, codings, my development/research works or anything that happens to interests me.
I'm a part designer and coder and some how a poor blogger, but trying hard in blog field to become a professional.

Leave a Reply

Your email address will not be published. Required fields are marked *