-
Notifications
You must be signed in to change notification settings - Fork 182
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
Fix EPERM on windows (#83) #165
Conversation
@zertosh I don't know anything about VM's from modern-ie. But I have successfully reproduced the issue on Windows 7 and Windows 8 using the following steps:
Edit: Found these steps here: #83 (comment) |
@ArtskydJ What editor was doing the saving? Does it happen with Sublime? |
@zertosh I believe I have reproduced this error using Sublime Text 3, Notepad++ and Atom. |
@ArtskydJ Perfect. Give me a day or two to see if I can reproduce it using a VM, and if so, I'll take this patch out spin. Thanks for looking into this! |
@zertosh You're welcome. Thanks for helping! |
@ArtskydJ I was able to repro on a "IE10 on Win7 for VirtualBox for Mac" from modern.IE VM. I had to install git, node and Sublime Text 3. I'm a bit swamped right now, I'm going to need another day or two to fully test this out. I'm thinking that the solution is actually to use graceful-fs, from the README: "On Windows, it retries renaming a file for up to one second if |
Interesting. I actually implemented a retry, but it did not solve the problem. (It would retry every second for up to 10 seconds.) I have reproduced the issue with, and without anti-virus software running. This patch solved the problem for me on both computers I work with, so I don't know why it's not working for you. Did you clone my fork, check out the C:\Users\Michael\Github\javascript\watchify\example>watchify files/main.js -v -o bundle.js
1228 bytes written to bundle.js (0.06 seconds)
Error: Parsing file C:\Users\Michael\Github\javascript\watchify\example\files\main.js: Unexpected token (2:17)
1228 bytes written to bundle.js (0.02 seconds)
1228 bytes written to bundle.js (0.03 seconds) You don't have to run C:\Users\Michael\Github\javascript\watchify>node bin\cmd.js example\files\main.js -v -o example\bundle.js
1228 bytes written to example\bundle.js (0.06 seconds)
Error: Parsing file C:\Users\Michael\Github\javascript\watchify\example\files\main.js: Unexpected token (1:0)
1228 bytes written to example\bundle.js (0.01 seconds)
1228 bytes written to example\bundle.js (0.02 seconds) |
@ArtskydJ Sorry for the misunderstanding. I was able to repro the bug, I haven't tried your patch yet. I just came across that line in graceful-fs while I was waiting for the VM image to download heh |
@zertosh Ha ha, sorry, I misunderstood you. :P |
Closing in favor of #169. |
Like #161, but it only skips writing to the dotfile if it's on windows.
On windows, it will pipe directly to the outfile.
On other platforms, it will pipe to the dotfile and rename it to the outfile.
Fixes #83.