ENOENT 构建时出错:“没有此类文件或目录,取消链接” - 如何解决?

问题描述 投票:0回答:0
enter code here

node:internal/fs/utils:350
    throw err;
    ^

Error: ENOENT: no such file or directory, unlink 'D:\Code\Web_Development\Java_Script_Notes\Asynchronous_JS\dist\index.html.
    at Object.unlinkSync (node:fs:1883:3)
    at WriteStream.<anonymous> (D:\Code\Web_Development\Java_Script_Notes\Asynchronous_JS\node_modules\@parcel\fs\lib\index.
    at Object.onceWrapper (node:events:629:26)
    at WriteStream.emit (node:events:526:35)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -4058,
  syscall: 'unlink',
  code: 'ENOENT',
  path: 'D:\\Code\\Web_Development\\Java_Script_Notes\\Asynchronous_JS\\dist\\index.html.9704.d'
}

Node.js v18.17.0

我在构建 JavaScript 项目时遇到问题。在构建过程中,我收到“ENOENT”错误,并显示消息“'没有此类文件或目录,取消链接'”。该错误特别指向“dist”目录中的文件“index.html.9704.d”。我使用 Node.js v18.17.0 和 Parcel 进行构建。

我已经仔细检查了文件路径和权限,但我似乎无法找出导致此问题的原因。 “dist”目录确实存在,但由于某种原因,构建过程无法取消链接错误中提到的文件。

node.js parcel
© www.soinside.com 2019 - 2024. All rights reserved.