Skip to content

[Bug]: file already exists when copy public dir to dist #1687

@shenjackyuanjie

Description

@shenjackyuanjie

Version

System:
    OS: Windows 10 10.0.19045
    CPU: (16) x64 AMD Ryzen 7 5800X 8-Core Processor
    Memory: 73.34 GB / 95.91 GB
  Browsers:
    Edge: Chromium (127.0.2651.8)
    Internet Explorer: 11.0.19041.4355
  npmPackages:
    rspress: ^1.38.0 => 1.38.0

Details

🔥 Rspress v1.38.0

node:internal/fs/promises:858
  return await PromisePrototypeThen(
         ^

Error: Copy public dir (V:\githubs\docs\rspress\docs\dr\docs\public) to dist failed:
EEXIST: file already exists, mkdir 'V:\githubs\docs\rspress\docs\dr\local_build'
    at async mkdir (node:internal/fs/promises:858:10)
    at async mkDirAndCopy (node:internal/fs/cp/cp:308:3)
    at async Promise.all (index 0)
    at async file:///V:/githubs/docs/rspress/node_modules/.pnpm/@rsbuild+core@1.1.11/node_modules/@rsbuild/core/dist/index.js:4548:25
    at async Object.call (file:///V:/githubs/docs/rspress/node_modules/.pnpm/@rsbuild+core@1.1.11/node_modules/@rsbuild/core/dist/index.js:2402:30)
    at async beforeCompile (file:///V:/githubs/docs/rspress/node_modules/.pnpm/@rsbuild+core@1.1.11/node_modules/@rsbuild/core/dist/index.js:2465:34) {
  errno: -4075,
  code: 'EEXIST',
  syscall: 'mkdir',
  path: 'V:\\githubs\\docs\\rspress\\docs\\dr\\local_build'
}

Node.js v23.2.0
 ELIFECYCLE  Command failed with exit code 1.
 ELIFECYCLE  Command failed with exit code 1.

Reproduce link

https://github.com/shenjackyuanjie/DR-docs

Reproduce Steps

pnpm build

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞 bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions