在linux系統(tǒng)下,清緩存,刪除node_modules
// 清理緩存
npm cache clean --force
// 執(zhí)行遞歸刪除node_modules文件夾
rm -rf node_modules
// 刪除包版本鎖
rm -rf package-lock.json
// 安裝npm
npm install
在windows系統(tǒng)下,清緩存,刪除node_modules
? ?法一:利用 powershell 執(zhí)行(推薦,速度快,秒刪)文章來源:http://www.zghlxwxcb.cn/news/detail-545808.html
// 清理緩存
npm cache clean --force
// powershell 執(zhí)行遞歸刪除node_modules文件夾
rd -r node_modules
// 刪除包版本鎖
ri package-lock.json
// 安裝npm
npm install
? ?法二:利用 npm 下載 rimraf?執(zhí)行文章來源地址http://www.zghlxwxcb.cn/news/detail-545808.html
// 清理緩存
npm cache clean --force
// 安裝 rimraf
npm install rimraf -g
// 執(zhí)行遞歸刪除node_modules文件夾
rimraf node_modules
// 刪除包版本鎖
rimraf package-lock.json
// 安裝npm
npm install
到了這里,關(guān)于Vue項目清理本地緩存并刪除node_modules (清除不掉揍我)的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!