parcel-bundler / parcel

The zero configuration build tool for the web. πŸ“¦πŸš€
https://parceljs.org
MIT License
43.28k stars 2.26k forks source link

Parcel Serve 2.8.0 randomly crashes while rebuilding #8615

Open roddypratt opened 1 year ago

roddypratt commented 1 year ago

After editing an HTML file and resaving, parcel will occasionally bomb out with the following trace.

Not repeatable, but this never happened with the previous 2.7.0 build.

Server running at http://localhost:1234
\ Building index.html...
node:internal/fs/utils:347
    throw err;
    ^

Error: ENOENT: no such file or directory, unlink 'C:\Rascular\ViewMaster\dist\index.html.2508.m'
    at Object.unlinkSync (node:fs:1767:3)
    at NodeFS.unlinkSync (C:\Rascular\ViewMaster\.pnp.cjs:5919:24)
    at makeCallSync.subPath.subPath (C:\Rascular\ViewMaster\.pnp.cjs:8166:26)
    at ZipOpenFS.makeCallSync (C:\Rascular\ViewMaster\.pnp.cjs:8379:14)
    at ZipOpenFS.unlinkSync (C:\Rascular\ViewMaster\.pnp.cjs:8165:17)
    at VirtualFS.unlinkSync (C:\Rascular\ViewMaster\.pnp.cjs:7463:24)
    at PosixFS.unlinkSync (C:\Rascular\ViewMaster\.pnp.cjs:7463:24)
    at URLFS.unlinkSync (C:\Rascular\ViewMaster\.pnp.cjs:7463:24)
    at WriteStream.<anonymous> (C:\Rascular\ViewMaster\.yarn\__virtual__\@parcel-fs-virtual-99d78ac16b\0\cache\@parcel-fs-npm-2.8.0-30a533924e-75d79963a1.zip\node_modules\@parcel\fs\lib\index.js:1019:83)
    at Object.onceWrapper (node:events:628:26) {
  errno: -4058,
  syscall: 'unlink',
  code: 'ENOENT',
  path: 'C:\\Rascular\\ViewMaster\\dist\\index.html.2508.m'

🌍 Your Environment

Software Version(s)
Parcel 2.8.0
Node 16.18.0
npm/Yarn Yarn 3.2.4
Operating System Windows 11
Elias-Graf commented 1 year ago

Slightly different error trace here:

- Building cv.html...
node:internal/fs/utils:345
    throw err;
    ^

Error: ENOENT: no such file or directory, unlink 'C:\Users\Elias\Desktop\cv\dist\cv.html.17068.k'
    at Object.unlinkSync (node:fs:1735:3)
    at WriteStream.<anonymous> (C:\Users\Elias\AppData\Roaming\npm\node_modules\parcel\node_modules\@parcel\fs\lib\index.js:1019:83)
    at Object.onceWrapper (node:events:642:26)
    at WriteStream.emit (node:events:539:35)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -4058,
  syscall: 'unlink',
  code: 'ENOENT',
  path: 'C:\\Users\\Elias\\Desktop\\cv\\dist\\cv.html.17068.k'
}
Software Version
Parcel 2.8.0
Node v16.16.0
npm 8.13.2
Operating System Windows 11

Maybe related to different versions of Node? 🀷

For me, this is sadly happening quite frequently.

Ayc0 commented 1 year ago

In https://github.com/parcel-bundler/parcel/pull/8625, I noticed another error related to rebuilding (but I think it's related to ESM and not on windows).

See https://github.com/parcel-bundler/parcel/pull/8625#issuecomment-1312589932

Elias-Graf commented 1 year ago

Related https://github.com/parcel-bundler/parcel/issues/8571

Elias-Graf commented 1 year ago

Not repeatable, but this never happened with the previous 2.7.0 build.

For me, it does very much happen also with older builds.

mischnic commented 1 year ago

How can I reproduce this on Windows?

Elias-Graf commented 1 year ago

@mischnic I'm honestly not sure, it's really inconsistent. I can tell you exactly what I'm doing, though:

  1. Open Windows terminal
  2. parcel serve <path to html>
  3. Open a new tab in Windows terminal
  4. Edit the file using the helix-editor

I've just tested and the same thing does seem to happen when using VS Code instead of the helix-editor.

roddypratt commented 1 year ago

@mischnic I'm honestly not sure, it's really inconsistent.

This. It's not always repeatable but I get it once or twice a day. Steps are as above. AFAICT editing any file that causes parcel to do rebuild/HMR may cause the issue.

You could try making a script that repeatedly modifies one of the HTML/JS assets and see if that triggers it?

I'm using Windows 11, VSCode 1.73.1

scottgarner commented 1 year ago

I can reproduce this consistently by rapidly hitting ctrl-S twice to save in VSCode after making a change that would trigger a rebuild.

partyvaper commented 1 year ago

Can consistently repeat this issue in Win 11, with latest Parcel version (2.8.1) and Node 16, Node 19, quite annyoing, quickly writing, saving, deleting few chars, saving again in html file, instantly introduces this issue

Never experienced this on macOS with same project.

image

I have tried removing, enabling HMR, changing config, passing various flags, basically no success. Maybe there is some flag to bypass all cache and random file names, as a quick workaround?

Might be solved with https://github.com/parcel-bundler/parcel/pull/8616/


After applying changes from https://github.com/parcel-bundler/parcel/pull/8616/ as yarn patch, it seemed to improve, but now I got another error:

Γ— Build failed.

@parcel/compressor-raw: EPERM: operation not permitted, rename D:\test\dist\index.html.12768.5c' -> 'D:\test\dist\index.html'

  Error: EPERM: operation not permitted, rename 'D:\test\dist\index.html.12768.5c' -> 'D:\test\dist\index.html'
andrew-rinato commented 1 year ago

Dropbox file sync was the culprit for me.

IMGROOT2 commented 1 year ago

Disabled OneDrive sync but to no avail. Still the same issue.

HelloJesus commented 1 year ago

i tried this writeStream.once("error", () => { failed = true; fs.unlinkSync(tmpFilePath); try { fs.unlinkSync(tmpFilePath); } catch (e) { // ignore error } }); in file \@parcel\fs\lib\index.js:1020 but i got:

    fs.unlinkSync(tmpFilePath);
            ^
ReferenceError: fs is not defined

Or what is the right way to make changes from github?

i wrote this: "start": "parcel ./src/index.html --no-cache", and maybe it's work

HelloJesus commented 1 year ago

Disabled OneDrive sync but to no avail. Still the same issue.

check this => "start": "parcel ./src/index.html --no-cache"

IMGROOT2 commented 1 year ago

Same error, same frequency (every other rebuild)

Cristy94 commented 1 year ago

Save error, parcel keeps on crashing on rebuilding (maybe when I save twice?):

Parcel: 2.8.3 on Windows 11.

Server running at http://localhost:1234
🚨 Build failed.
Server running at http://localhost:1234
- Optimizing index.[hash].js...
internal/fs/utils.js:308
    throw err;
    ^

Error: ENOENT: no such file or directory, unlink '...\dist\index.2d3ace14.js.484.1w'
    at Object.unlinkSync (fs.js:1210:3)
    at WriteStream.<anonymous> (...\node_modules\@parcel\core\node_modules\@parcel\fs\lib\index.js:1019:83)
    at Object.onceWrapper (events.js:422:26)
    at WriteStream.emit (events.js:327:22)
    at emitErrorNT (internal/streams/destroy.js:106:8)
    at emitErrorCloseNT (internal/streams/destroy.js:74:3)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  errno: -4058,
  syscall: 'unlink',
  code: 'ENOENT',
  path: '...\dist\\index.2d3ace14.js.484.1w'
}
IMGROOT2 commented 1 year ago

This is the exact error I get, as well. I’m also on Windows 11. I did some testing and found out this never happens when Parcel is run on a cloud server (GitHub Codespaces, Gitpod). Does that help?

tikato commented 1 year ago

Happening for me as well (VSC 1.77.0). Running Node v18.12.0 and it crashes randomly when I update a file (html, js, scss).

xamasistemas commented 1 year ago

We made a workaround. We created a 'cleanup' script who celan the .parcel-cache and dist folder.

"scripts": {
    "cleanup": "rimraf .parcel-cache dist",
    "dev": "npm run cleanup && parcel ./src/index.html --no-cache",
    "prebuild": "npx rimraf build",
    "build": "parcel build --public-url ./ ./src/index.html --no-cache"
  },

maybe the problema is concurrency and file lock in the .parcel-cache folder

Elpatii commented 1 year ago

Same for me.

Occurs every time after 3 saves of my index.html.

Server running at http://localhost:1234
- Building index.html...
node:internal/fs/utils:348
    throw err;
    ^

Error: ENOENT: no such file or directory, unlink 'C:\Users\Elpatii\npm\test\dist\index.html.2548.v'
    at Object.unlinkSync (node:fs:1813:3)
    at WriteStream.<anonymous> (C:\Users\Elpatii\npm\test\node_modules\@parcel\fs\lib\index.js:1019:83)
    at Object.onceWrapper (node:events:626:26)
    at WriteStream.emit (node:events:523: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: 'C:\\Users\\Elpatii\\npm\\test\\dist\\index.html.2548.v'
}

Run with --no-cache doesn't help, nor cleaning up .parcel-cache and distfolder. No problem with Parcel 2.7.0.

Software Version
Parcel 2.8.3
Node.js 20.0.0
npm 9.6.4
Operating System Windows 11 Pro 22H2
Cristy94 commented 1 year ago

Still happens for me in the latest nightly version (2.0.0-nightly.1293).

image
DarrenDanielDay commented 1 year ago

Same problem on Windows 10, really annoying.

But it seems parcel won't crash if I only edit & save HTML files that are not page entries. Currently I try to avoid this problem by changing the HTML files I edit from page entry files to files imported as text bundle.

<!-- the entry HTML file, like `index.html`, that I would never edit after parcel started -->
<script type="module" src="./proxy.js"></script>
// proxy.js
import html from "bundle-text:./the-page-content.html";

document.open();
document.write(html);
document.close();

./the-page-content.html is the real HTML content file that I would edit frequently, and parcel would not crash when I save the-page-content.html.

Is this behavior useful to help find out the bug?

tones31 commented 1 year ago

I have the same problem. All I did was start up a brand new parcel project and install tailwindcss following their guide on using it with parcel. It ran fine. Then I deleted "hello world" from the HTML file and it crashed

Error: ENOENT: no such file or directory, unlink 'C:\Test\website\dist\index.html.19376.8'
    at Object.unlinkSync (node:fs:1767:3)
    at WriteStream.<anonymous> (C:\Test\website\node_modules\@parcel\fs\lib\index.js:1028:83)
    at Object.onceWrapper (node:events:628:26)
    at WriteStream.emit (node:events:525:35)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {      
  errno: -4058,
  syscall: 'unlink',
  code: 'ENOENT',
  path: 'C:\\Test\\website\\dist\\index.html.19376.8'

I can reproduce it every time. Just run npx parcel src/index.html and modify the HTML file two times. I also have auto save on VS code.

xGeekoo commented 11 months ago

Do we have any fix for that ?

lexuzieel commented 11 months ago

This issue still happens for me as well. Any ETA for a fix?

benyrfg commented 10 months ago

I have the same issue.

Cristy94 commented 9 months ago

Ok, found a way to reproduce the crash with Error: ENOENT: no such file or directory, unlink:

Error: ENOENT: no such file or directory, unlink 'C:\wamp64\www\userTrack\dist\index.2d3ace14.js.20660.3q'
    at Object.unlinkSync (node:fs:1883:3)
    at WriteStream.<anonymous> (C:\wamp64\www\userTrack\node_modules\@parcel\fs\lib\index.js:1028:83)
    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: 'C:\\wamp64\\www\\userTrack\\dist\\index.2d3ace14.js.20660.3q'
}

So, to trigger the crash in 2 seconds, with dev tools open and "Pause on exceptions on", add this line console.log(undefined_variable), save the file, comment the line, save the file again.

kumaramit24apps commented 9 months ago

Same issue with me also. Whenever I try to change something in the html file it simply crashes every time. I tried everything but couldn't fix. What could be the possible reason? I tried using pnpm instead of npm, still stuck in that loophole.

Server running at http://localhost:1234
/ Bundling...
node:internal/fs/utils:350
    throw err;
    ^

Error: ENOENT: no such file or directory, unlink 'C:\GitHub\PNPM-Projects\HelloPNPM\dist\index.html.23708.j'  
    at Object.unlinkSync (node:fs:1883:3)
    at WriteStream.<anonymous> (C:\Users\ikuma\AppData\Local\pnpm\store\v3\tmp\dlx-26124\node_modules\.pnpm\@parcel+fs@2.9.3_@parcel+core@2.9.3\node_modules\@parcel\fs\lib\index.js:1028:83)
    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: 'C:\\GitHub\\PNPM-Projects\\HelloPNPM\\dist\\index.html.23708.j'
}
Cristy94 commented 9 months ago

@mischnic

Ok, found a way to reproduce the crash with Error: ENOENT: no such file or directory, unlink:

  • Have parcel running
  • Have the website open in your browser
  • Have DevTools open with "Pause on uncaught exceptions"
  • Introduce an exception error in your code (e.g. console.log(undefined_variable))
  • Save the file (so the app is reloaded and the browser pauses)
  • Fix the error (remove the exception) and save the file again
  • Because the app compiles BUT the browser JS execution is still paused (on debugger), Parcel crashes for some reason:
Error: ENOENT: no such file or directory, unlink 'C:\wamp64\www\userTrack\dist\index.2d3ace14.js.20660.3q'
    at Object.unlinkSync (node:fs:1883:3)
    at WriteStream.<anonymous> (C:\wamp64\www\userTrack\node_modules\@parcel\fs\lib\index.js:1028:83)
    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: 'C:\\wamp64\\www\\userTrack\\dist\\index.2d3ace14.js.20660.3q'
}

So, to trigger the crash in 2 seconds, with dev tools open and "Pause on exceptions on", add this line console.log(undefined_variable), save the file, comment the line, save the file again.

kumaramit24apps commented 9 months ago

I was able to fix this crashing problem by merely fixing my content configuration inside tailwindcss.config.js file. It seemed to crash when it was unable to find the specific path I wrote inside the content property. So, I did the following to fix the issue:

/** @type {import('tailwindcss').Config} */
module.exports = {
-     content: ["./*.html"],
+    content: ["./src/**/*.{html, js, tsx, jsx, ts}"],
  theme: {
    extend: {},
  },
  plugins: [],
}
HenkVanMaanen commented 7 months ago

We had the same problem. The solution was to recursive chown the src directory to the current user so that the permissions of all files are fixed.

chown -R $(id -u):$(id -g) .

msimpson commented 6 months ago

The only workaround I've found to mitigate this issue is to disable HMR (--no-hmr).

Which, of course, is not the greatest DX; but at least I'm not restarting Parcel every other file save.

Cristy94 commented 6 months ago

The only workaround I've found to mitigate this issue is to disable HMR (--no-hmr).

Which, of course, is not the greatest DX; but at least I'm not restarting Parcel every other file save.

I mean, what's the point of 10ms HMR reloads, if we can't use it because it crashes?

Shouldn't this issue be a high priority, as it almost makes Parcel obsolete?

olliefwilliams commented 5 months ago

Also hitting this issue. Was quite excited to use parcel as it worked really well on MacOS. Sadly the exact same project hits this error on W10.

LukasBeh commented 5 months ago

I have the same Issue but weirdly, it only crashes when the site is opened in Firefox. In Edge, I don't have this problem. If I open it in Firefox private mode, there is no issue as well. But it's not something that's related to my cache or browser plugins, as I also have this problem when I start Firefox in safe mode.

Edit: ~Deleting cache, cookies and site-data actually solved this issue for me~. After deleting cache, cookies and site-data the issue occurs much less frequently. Didn't know that Cache / Cookies / Site Data is still accessed in safe mode

ahmadmohammadirad2006 commented 2 months ago

Same issue for me , Is there any fix for that?

netbka commented 2 months ago

This is still an issue. Working with parcel and tailwindcss. Tried all the proposed solutions but it keeps crashing

Ethan-C-Honzik commented 1 month ago

Never had an issue until recently in some projects where I tried using tailwind and later picocss. Seems its likely css related? Could also be a coincidence but odd its never happened until now

PinkMeNow commented 1 month ago

Happens to me all the time, not using tailwind but using Bootstrap + SCSS. Makes parcel barely usable. This should be a highest priority issue.

runtimerror commented 1 month ago

I'm having this issue on nearly every other save. It's most frequent when I save an html file. I'm using Windows 11, and for the moment my project only consists of one html file, a css file, and a js file. It's all vanilla. I'm about to ditch Parcel and try something else.

Ethan-C-Honzik commented 1 month ago

I'm having this issue on nearly every other save. It's most frequent when I save an html file. I'm using Windows 11, and for the moment my project only consists of one html file, a css file, and a js file. It's all vanilla. I'm about to ditch Parcel and try something else.

Weird I've never had the crashing with a setup like that. I've been using vite as an alternative for my crashing projects as of late. Bit of a shame as I prefer parcel for no framework ts projects.

Ethan-C-Honzik commented 1 month ago

After some more testing I've determined that this crash only happens when a tab is open to the hosted page. Some of my projects have never had a crash before but others are unusable. On the projects that are crashing, its roughly every 3 saves or so. I know some people mentioned only having the issue in firefox but I've seen the crash occur on both edge, firefox, and firefox private tabs.

devongovett commented 1 month ago

If you're having an issue could you please post the exact error message you get or steps leading up to the problem? Also your operating system, parcel version, and any other relevant info. I'm unclear if these are the same issue as the OP or many different things.

lucio-lima commented 1 month ago

A simple project and I'm also having the same error. After saving 3 or 4 times the error occurs.

If the browser is closed, the error does not occur, only when it is open.

npm: 10.5.2 node: 20.12.2 parcel: 2.12.0 Chrome: 124.0.6367 OS: Windows 11

HTML

<!DOCTYPE html>
<html lang="pt-br">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Web Project</title>
    <link rel="stylesheet" href="assets/css/styles.css">
</head>

<body>
    Hello Web
</body>

</html>

CSS

~ empty

CONSOLE ERROR

node:fs:1874
  binding.unlink(path);
          ^

Error: ENOENT: no such file or directory, unlink 'E:\projects\web\dist\index.html.4576.g'
    at Object.unlinkSync (node:fs:1874:11)
    at WriteStream.<anonymous> (E:\projects\web\node_modules\@parcel\fs\lib\index.js:1024:83)
    at Object.onceWrapper (node:events:633:26)
    at WriteStream.emit (node:events:530:35)
    at emitErrorNT (node:internal/streams/destroy:169:8)
    at emitErrorCloseNT (node:internal/streams/destroy:128:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'unlink',
  path: 'E:\\projects\\web\\dist\\index.html.4576.g'
}
chwilliamson-clgx commented 1 month ago

Same issue here. It's really frustrating. If no fix soon, will have to ditch Parcel.

Server running at http://localhost:1234 β ‡ Optimizing index.[hash].css... node:fs:1877 binding.unlink(path); ^

Error: ENOENT: no such file or directory, unlink 'C:*****\src\dist\index.html.251360.bx' at Object.unlinkSync (node:fs:1877:11) at WriteStream. (C:\Users\\AppData\Roaming\npm\node_modules\parcel\node_modules\@parcel\fs\lib\index.js:1024:83) at Object.onceWrapper (node:events:634:26) at WriteStream.emit (node:events:531:35) at emitErrorNT (node:internal/streams/destroy:169:8) at emitErrorCloseNT (node:internal/streams/destroy:128:3) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { errno: -4058, code: 'ENOENT', syscall: 'unlink', path: '***\index.html.251360.bx' }

Node.js v20.13.1

chwilliamson-clgx commented 1 month ago

Adding this existsSync() check before the unlinkSync worked for me. I modified the following file: C:\Users\redacted\AppData\Roaming\npm\node_modules\parcel\node_modules\@parcel\fs\lib\index.js

It fixed my coworker as well, maybe others can verify and then someone can make a PR (or maybe fix it in a better way)

writeStream.once("error", () => {
            failed = true;
            if ((0, (/*@__PURE__*/$parcel$interopDefault($0aeff293b9dd16bd$exports))).existsSync(tmpFilePath)) {
                (0, (/*@__PURE__*/$parcel$interopDefault($0aeff293b9dd16bd$exports))).unlinkSync(tmpFilePath);
            }
        });
        return writeStream;
PinkMeNow commented 4 weeks ago

@chwilliamson-clgx

Adding this existsSync() check before the unlinkSync worked for me. I modified the following file: C:\Users\redacted\AppData\Roaming\npm\node_modules\parcel\node_modules@parcel\fs\lib\index.js

Can you tell me what was the original code before you replaced it?

chwilliamson-clgx commented 4 weeks ago

@chwilliamson-clgx

Adding this existsSync() check before the unlinkSync worked for me. I modified the following file: C:\Users\redacted\AppData\Roaming\npm\node_modules\parcel\node_modules@parcel\fs\lib\index.js

Can you tell me what was the original code before you replaced it?

Just the same exact code without the if condition. However, the change worked perfectly for many days, it's suddenly just today back to crashing every few saves. I have no explanation for this. Windows 10 here.

abbasrizvi2 commented 3 weeks ago

@chwilliamson-clgx

Adding this existsSync() check before the unlinkSync worked for me. I modified the following file: C:\Users\redacted\AppData\Roaming\npm\node_modules\parcel\node_modules@parcel\fs\lib\index.js

Can you tell me what was the original code before you replaced it?

Just the same exact code without the if condition. However, the change worked perfectly for many days, it's suddenly just today back to crashing every few saves. I have no explanation for this. Windows 10 here.

I am also fed up with this error, wasted almost 3 days solving it and still can't find a solution

abbasrizvi2 commented 3 weeks ago

If you're having an issue could you please post the exact error message you get or steps leading up to the problem? Also your operating system, parcel version, and any other relevant info. I'm unclear if these are the same issue as the OP or many different things.

after running npx parcel it work fine but when I make some changes in my html file it throws this error

`Server running at http://localhost:1234 β ‹ Building index.html... node:fs:1877 binding.unlink(path); ^

Error: ENOENT: no such file or directory, unlink 'C:\Users\abbas\OneDrive\Desktop\Namaste React\dist\index.html.16372.a' at Object.unlinkSync (node:fs:1877:11) at WriteStream. (C:\Users\abbas\OneDrive\Desktop\Namaste React\node_modules\@parcel\fs\lib\index.js:1024:83) at Object.onceWrapper (node:events:634:26) at WriteStream.emit (node:events:531:35) at emitErrorNT (node:internal/streams/destroy:169:8) at emitErrorCloseNT (node:internal/streams/destroy:128:3) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { errno: -4058, code: 'ENOENT', syscall: 'unlink', path: 'C:\Users\abbas\OneDrive\Desktop\Namaste React\dist\index.html.16372.a' }

Node.js v20.13.1`

parcel :2.12.0 windows: 11

chwilliamson-clgx commented 6 days ago

I applied my attempt at a fix to the correct file this time, rather than the AppData/Roaming location, the location in my actual project (node_modules@parcel\fs\lib\index.js). The original error goes away, but I then I got an error in the same method for the rename operation, which I also fixed, but now get an open error below. The crux of these errors is basically file in use issue on Windows. Not sure if this is happening on other OS's. Quite annoying.

Stream error: [Error: EPERM: operation not permitted, open 'C:\dev\repos\xxxxxxxxxx\src\dist\index.7ea68831.js'] { errno: -4048, code: 'EPERM', syscall: 'open', path: 'C:\dev\repos\xxxxxxxxxxx\src\dist\index.7ea68831.js' }