Skip to content

Commit

Permalink
fix: fixed ENOENT: no such file or directory
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromehan committed Dec 28, 2022
1 parent 13ac37d commit b3588d0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/vite/src/node/optimizer/index.ts
Expand Up @@ -496,7 +496,9 @@ export async function runOptimizeDeps(
// Write metadata file, delete `deps` folder and rename the `processing` folder to `deps`
// Processing is done, we can now replace the depsCacheDir with processingCacheDir
// Rewire the file paths from the temporal processing dir to the final deps cache dir
await removeDir(depsCacheDir)
if (fs.existsSync(depsCacheDir)) {
await removeDir(depsCacheDir)
}
await renameDir(processingCacheDir, depsCacheDir)
},
cancel() {
Expand Down

0 comments on commit b3588d0

Please sign in to comment.