-
Notifications
You must be signed in to change notification settings - Fork 96
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
Error:EPERM:operation not permitted,rename #17
Comments
I ran into the same issue. There should be no reason why we would not be allowed to change a file we created ourselves, so my guess is that Windows Defender is preventing this because we interact with the file too often. I've added the entire program folder of my vue-electron app as an exception, so I guess I'll see what that brings in a short while. Unfortunately this error completely stops the program from working, so we should add least add some error handling and back up methods for this. |
Adding the exception did not help, unfortunately. Issue seems to have been reported in |
I also encountered the same problem, is there a way to solve it? |
PR #20 |
I've just spent a few hours hunting this down. The following is my understanding... Ultimately, I think the issue comes from here.
It turns out that in Windows (and it seems Windows only), the rename ability is not atomic; i.e. multiple processes can try to do it at once. When one process has beaten another to it, you get this EPERM error. The solution for my application is going to be to throttle the use of I may do a pull request in time but I think we need to offer developers the option of using a throttle or debounce and let them choose what is appropriate for them. |
I'm new in
|
#44 Basically, no. These things take up a lot of unpaid time sadly.
I have created a fix (by throttling setState). I'll put it on my fork later today and share a link. |
@baruchiro Regarding your yarn thing ... My understanding is that [email protected] is kept because it is a dependency of this project. The problem, however, is with |
My workaround was done one commit to adding all items in a collection, instead of committing each. |
@baruchiro Feel free to try my forked repo. When you initiate
This will mean the app writes to disk a maximum of once every second. It's worked well for me. It's also a trailing throttle, meaning the last setState will be applied so long as the app isn't closed with |
@michaeljpeake Does your fork have a package? |
You should be able to install it with |
@michaeljpeake there was an issue with your |
Thanks @tominal. I see I changed the variable name but not its declaration. Oops. Fixed in my repo too now, in case I come back to it. Compromise is a suitable word. It doesn't feel quite right but it seems to be working. Also, if your store gets big, it's probably desirable to avoid writing it to disk constantly. |
somewhere of the file var last, e = Date.now(); |
Thanks @suifengtec. I needed to actually build the thing rather than just update the src code. |
Any specific reason you decided not to publish a new npm module?. Please do consider publishing a package on npm with your forked repo. Thank you. |
…ll write to disk once a second, which should prevent windows defender from checking the file and changing the name.
The text was updated successfully, but these errors were encountered: