How to delete folders created by yoman on Windows?

Following this guide , after executing the yo webapp command, a folder called node_modules is created. I want to delete this folder, but I can not do it either using the command line or using Windows Explorer, because the path is too long. How can I delete this folder?

Error message on console:

rmdir: the specified path, file name, or both are too long. A fully qualified file name must be less than 260 characters, and a directory name must be less than 248 characters.

+2
source share
2 answers

Specify the path using the Extended Length Path syntax, for example. \\?\C:\Path\to\an\existing.file .

In addition, I have successfully used Total Commander to delete a directory in a long way.

+1
source

You can use rimraf , which is the unix rm -rf for node .:

 $ rimraf <name of dir to delete> 

You can install rimraf with npm:

 $ npm install -g rimraf 
+1
source

Source: https://habr.com/ru/post/986120/


All Articles