Skip to content

Conversation

435012357
Copy link

Description

Fix issue where rmSync fails to remove files and folders with Chinese names when using create-vite on Node.js 24.

Changes

  • Replace fs.rmSync() with fsp.rm() promise variant
  • Ensure proper handling of Unicode file names

Fixes #20724

- 将函数名 "assync" 更正为 "async"
- 确保 emptyDir 函数正确声明为异步函数
- 修复潜在的运行时错误及类型检查问题
- 修正 `fs.promises.rm` 调用处缺少结束大括号的问题
- 保证目录内文件逐个递归删除操作正常执行
- 避免因语法错误导致清空目录功能失效
@435012357 435012357 changed the title Fix/create vite rm chinese file #20724 fix(create-vite): rmSync chinese file #20724 Sep 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

create-vite [email protected] 已经存在对应目录的时候如果里面包含中文文件和文件夹使用fs.rmsync 会删除不掉
1 participant