How delete folders created by yeoman in Windows?

▼魔方 西西 提交于 2019-12-24 03:20:09

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!