快速刪除node modules資料夾

2022-02-22 10:33:08 字數 345 閱讀 9073

當安裝了較多模組後,node_modules目錄下的檔案會很多,直接刪除整個目錄會很慢,下面介紹些快速刪除node_modules目錄的方法。

在全域性安裝rimraf模組,然後通過其命令來快速刪除node_modules目錄:

npm install rimraf -g

rimraf node_modules

首先在cmd視窗中進入到node_modules資料夾所在的路徑,接著執行命令:

rmdir /s/q node_modules
rm -f /node_modules

快速刪除node modules

解決方法 使用npm的乙個名為rimraf的模組進行刪除 官方描述 the unix commandrm rffor node,即node環境下模擬unix或者linux下的rm rf 強制刪除命令 使用 cd the folder which includes node modules folde...

快速刪除node modules的方法

前端開發過程中,經常會遇到npm操作問題,有時候不得不需要刪除node modules目錄下所有的檔案,然後重新npm install。但是當依賴包很多的時候,每次手動刪除node modules都需要5分鐘以上,太浪費寶貴的時間啦,另外還可能遇到需要許可權,點選同意,還是刪除失敗,只能在每個資料夾...

快速刪除node modules資料夾

解決方法 使用npm的乙個名為rimraf的模組進行刪除 官方描述 the unix commandrm rffor node,即node環境下模擬unix或者linux下的rm rf 強制刪除命令 使用 cd the folder which includes node modules folde...