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.
You can do this for deleting any longer folder path.