问题
Following this guide, after execute the command yo webapp
a folder named node_modules is created. I want to delete that folder but I can't do it neither using command line or Windows file explorer because the path is too long. How I can delete this folder?
Error message at console:
rmdir : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
回答1:
Specify the path using Extended Length Path syntax, e.g. \\?\C:\Path\to\an\existing.file
.
Also, I successfully used Total Commander to delete a directory in a long path.
回答2:
You can use rimraf which is the unix command rm -rf
for node.:
$ rimraf <name of dir to delete>
You can install rimraf using npm:
$ npm install -g rimraf
来源:https://stackoverflow.com/questions/28995921/how-delete-folders-created-by-yeoman-in-windows