parcel: Parcel 2: EPERM: operation not permitted, rename '...' -> '...'
🐛 bug report
When modifying files, there’s sometimes this error that is thrown:
Error: EPERM: operation not permitted, rename 'C:devtestdistindex.015b01c3.js.3811495039' -> 'C:devtestdistindex.015b01c3.js'
The error is quite inconsistent.
| Software | Version(s) |
|---|---|
| Parcel | ^2.0.0-nightly.353 |
| Node | v14.3.0 |
| Operating System | Windows 10 Pro 1909 |
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 14
- Comments: 24 (4 by maintainers)
I suspect that the reason that this happens on Windows only is that using
renameormvto overwrite an existing file works fine on Linux/macOS but causes this error on Windows:(This issue is about
EPERM renamewith thedistdir) I think the reason is that Parcel tries to write a bundle to the dist dir multiple times concurrently.Same issue for me, “🚨 Error: EPERM: operation not permitted, rename”.
Getting this in serve mode, which stops working and requires a restart (edit: as in, Ctrl+C and run it again).
It feels like v2 isn’t ready enough for v1 to be marked deprecated.
Same for me (Windows 10 Home, parcel: ^2.0.0-beta.1). Happens often if i change the HTML file parcel is serving.
Currently I get this every time I change the file, I also deleted the cache and dist folders and restarted parcel, still no luck 😦 Every change after start leads to this error. If I change the content back to the original at start time, the server is building again.
Just in case anyone’s restarting their computer to fix this, I found that closing my terminal and opening a new one fixed the issue. Still annoying tho.
I am still getting this error. Ever since I updated Parcel. This happens regardless of whether I am making changes to html or scss files.
<html><body>This is intentional, the cache is also used to send data between threads
Any progress? 😃
I am using
2.0.0-nightly.514on Windows 10 Command-Line, and the issue still persists. Well, “persists” might be misleading. Sometimes it’s there, sometimes it is not.For me, adding
--no-cachehas no effect at all -parcel buildnevertheless creates/uses the.parcel-cache/directory and generates the ‘EPERM’ error, just as without--no-cache. Smells like a bug in itself :''DDowngrading to
2.0.0-nightly.286(as mentioned in #5036 in this comment) works, however this older version is much slower, etc.My currently best “solution” is to simply ignore the ‘EPERM’ errors, because they don’t abort the
parcel buildprocess 😉