在windows下安装了一个包,但是在删除node_modules
文件夹时提示该文件夹包含名称过长删除不了。怎么才能彻底删除这个文件夹?
黄舟2017-04-17 13:33:48
When I get the prompt that it is too long under Win8, I can delete it directly but cannot delete it to the trash.
In addition, you can use rmdir /s/q your_app_dir
in the command console to delete
Another way is to enter the node_modules directory and delete the directories one by one until the one that cannot be deleted is reached. Go in again and repeat. In fact, basically go into the node_modules directory, go a few more levels and try again. Delete the ones inside and then delete the ones outside.
黄舟2017-04-17 13:33:48
Look at the error message and see which module file name is too long. Use the command npm uninstall 模块名
to uninstall the module through the command, and then try to delete the directory again. If it still doesn’t work, repeat the uninstall command until it is Until all modules with too long names are uninstalled
高洛峰2017-04-17 13:33:48
Right-click to obtain administrator rights first, and then delete. Or shred folders through Computer Manager or 360
高洛峰2017-04-17 13:33:48
Use 7zip or rar to add to the compressed file, and select to delete the original file, and then delete the compressed file.
@leftstick’s npm uninstall
works too.