xun082 / create-neat

🚀🚀🚀 Developed a front-end scaffold based on PNPM and Turborepo, aimed at quickly creating various types of projects for users.
MIT License
460 stars 131 forks source link

Error: EEXIST: file already exists, mkdir 'public' #271

Closed cpdtzy closed 1 month ago

cpdtzy commented 2 months ago

Current behavior

重复创建 public,已创建的前提下,public 文件创建报错

Minimum reproduction code

xun082/create-neat

Steps to reproduce

create-neat demo --dev

Expected behavior

node:fs:1382
  const result = binding.mkdir(
                         ^

Error: EEXIST: file already exists, mkdir 'D:\document\test-create-neat\demo\public'
    at Object.mkdirSync (node:fs:1382:26)
    at D:\document\create-neat\packages\core\dist\models\FileTree.js:145:28
    at Array.forEach (<anonymous>)
    at FileTree.renderAllFiles (D:\document\create-neat\packages\core\dist\models\FileTree.js:143:23)
    at Generator.generate (D:\document\create-neat\packages\core\dist\models\Generator.js:235:20)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async createAppTest (D:\document\create-neat\packages\core\dist\utils\createApp.js:93:5) {
  errno: -4075,
  code: 'EEXIST',
  syscall: 'mkdir',
  path: 'D:\\document\\test-create-neat\\demo\\public'
}

Package version

1.0.6

Template Package

react-web-ts

Node.js version

No response

In which operating systems have you tested?

Other

No response