node.js - 怎么删除node_modules文件夹?
天蓬老师
天蓬老师 2017-04-17 13:31:48
0
7
620

在windows下安装了一个包,但是在删除node_modules文件夹时提示该文件夹包含名称过长删除不了。怎么才能彻底删除这个文件夹?

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(7)
伊谢尔伦

Recommend giving it a try

npm install rimraf -g
rimraf node_modules
黄舟

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.

黄舟

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

小葫芦

rm -f /node_modules

小葫芦

Right-click to obtain administrator rights first, and then delete. Or shred folders through Computer Manager or 360

小葫芦

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.

左手右手慢动作

Use rimraf directly under windows.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template