-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parcel Serve 2.8.0 randomly crashes while rebuilding #8615
Comments
Slightly different error trace here:
Maybe related to different versions of Node? 🤷 For me, this is sadly happening quite frequently. |
In #8625, I noticed another error related to rebuilding (but I think it's related to ESM and not on windows). See #8625 (comment) |
Related #8571 |
For me, it does very much happen also with older builds. |
How can I reproduce this on Windows? |
@mischnic I'm honestly not sure, it's really inconsistent. I can tell you exactly what I'm doing, though:
I've just tested and the same thing does seem to happen when using VS Code instead of the helix-editor. |
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 |
I can reproduce this consistently by rapidly hitting ctrl-S twice to save in VSCode after making a change that would trigger a rebuild. |
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. 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 #8616 After applying changes from #8616 as yarn patch, it seemed to improve, but now I got another error:
|
Dropbox file sync was the culprit for me. |
Disabled OneDrive sync but to no avail. Still the same issue. |
i tried this
Or what is the right way to make changes from github? i wrote this: |
check this => "start": "parcel ./src/index.html --no-cache" |
Same error, same frequency (every other rebuild) |
Save error, parcel keeps on crashing on rebuilding (maybe when I save twice?): Parcel: 2.8.3 on Windows 11.
|
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? |
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). |
We made a workaround. We created a 'cleanup' script who celan the .parcel-cache and dist folder.
maybe the problema is concurrency and file lock in the .parcel-cache folder |
Same for me. Occurs every time after 3 saves of my index.html.
Run with
|
Same problem on Windows 10, really annoying. But it seems <!-- 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();
Is this behavior useful to help find out the bug? |
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
I can reproduce it every time. Just run |
Do we have any fix for that ? |
I was able to fix this crashing problem by merely fixing my /** @type {import('tailwindcss').Config} */
module.exports = {
- content: ["./*.html"],
+ content: ["./src/**/*.{html, js, tsx, jsx, ts}"],
theme: {
extend: {},
},
plugins: [],
} |
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.
|
The only workaround I've found to mitigate this issue is to disable 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? |
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. |
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: |
Same issue for me , Is there any fix for that? |
This is still an issue. |
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 |
Happens to me all the time, not using tailwind but using Bootstrap + SCSS. Makes parcel barely usable. This should be a highest priority issue. |
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. |
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. |
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. |
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 HTML
CSS
CONSOLE ERROR
|
Same issue here. It's really frustrating. If no fix soon, will have to ditch Parcel. Server running at http://localhost:1234 Error: ENOENT: no such file or directory, unlink 'C:*\src\dist\index.html.251360.bx' Node.js v20.13.1 |
Adding this existsSync() check before the unlinkSync worked for me. I modified the following file: 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)
|
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 |
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 Error: ENOENT: no such file or directory, unlink 'C:\Users\abbas\OneDrive\Desktop\Namaste React\dist\index.html.16372.a' Node.js v20.13.1` parcel :2.12.0 |
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'] { |
started to use vite instead and it does not suffer from any of the issues described |
I have this issue on every second save, Node v.18.18.0, Parcel 2.12.0, VSCode, Win 11, latest Chrome. for anyone who struggling with this, i don't want to spend time to fix parcel, from now i'm just spawning it with pm2 and when parcel fails pm2 restarting it. |
happening every time i update a file that parcel is serving |
Same issue, reliably reproducable:
Played around a bit, updated my environment, played around some more... It only happens now when I save a change to the entry file for a second time... i.e. It does not matter how many times I save index.html or how fast, if nothing has changed, however make one change and save it, fine, (even repeated fast saves without a second change fine) May try @DarrenDanielDay 's fix to export the index.html code to a different file...
|
UPDATE: So... I cleaned up everything today... uninstalled parcel, etc.. rebooted... got back to it, and all was fine UNTIL I put the hot module code in:
then everything wen't wrong again... :/ obviously there's still issues but I hope this is useful to someone who's having their day ruined by parcel, lol |
Still the same issue two years later on version 2.12.0. |
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.
🌍 Your Environment
The text was updated successfully, but these errors were encountered: