-
Notifications
You must be signed in to change notification settings - Fork 773
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
fs.copy silently fails on windows #358
Comments
@arekkas thank you for your report and offer to help. It seems that
Let's start with this... which version of Node are you using? Does changing the version of Node to a previous version (in particular, older major), still cause the issue? |
Thanks for your swift reply. I'm currently using node 6.6.0. Unfortunately, there is no |
btw I use |
@arekkas https://github.com/coreybutler/nvm-windows However, please only switch nvm windows if you think you'll get personal value out of it. Thanks for your willingness to help here. |
Ok, installed. Tried majors 4, 5, 6. All of them have (apparently) the same issue. |
I did some good old function doneOne (skipped) {
console.log('doneOne 1', skipped)
if (!skipped) running--
console.log('doneOne 2', skipped)
finished++
if ((started === finished) && (running === 0)) {
console.log('doneOne 3', skipped)
if (callback !== undefined) {
console.log('doneOne 4', skipped)
return callback(null)
}
}
console.log('doneOne 5', skipped, started, finished, running)
} The last logs before the task quits are:
|
Ok, further debugged it. Apparently the last operation that is happening is
|
On a side note: it would help so much if there was debugging information available from node-fs-extra using an env var or something :D |
@jprichardson is it possible that this is caused by the
I fucking hate windows. |
@jprichardson Sometimes I wonder if we shouldn't just escalate #292. With native promise support in node 4+, messing with these counters just seems so wrong. |
So I'm not really sure where the culprit is now, if it's node-fs-extra or node-graceful-fs. Anyone any ideas? Unfortunately it's a blocking issue for me :( |
Not yet, but we're digging! Hopefully can get a resolution early this week. |
The issue does apparently no longer occur on node 7.6.0 |
@arekkas are you still experiencing the issue? |
Not with node 7.6.0 :) |
@arekkas since Node v7.6.0 fixes things, perhaps it was a libuv issue? Are you comfortable with us closing this issue? |
Maybe it could be pointed out in the readme! Otherwise good to close for me. |
SGTM, @arekkas care to submit a PR? |
is there a specific change in node 7.6.0 that fixed it? If so, then shouldn't the node folks be backporting it to the LTS release? |
@jrobeson We're not quite sure what the root of the issue is here. It may be an issue with Node, or it may be an issue with the way |
I'm experiencing fse silently failed too, but my settings is different. Everything is running on Linux with no problem, until I switch my working terminal to be Windows (node is still running on Linux server), update a few files using local editor, and boom! fse.copy() doesn't work anymore. Note that it's fse.copy() on Node v8.0.0 on Ubuntu. Trial and errors resolved the problem, the suspect was line ending characters on Windows has creep into some files I edited locally. After removing them, fse.copy() work partially. I'm using pm2-dev cmd to start my node app, and the problem only appear when invoking pm2-dev not normal production pm2. Not sure yet what causes the problem but giving you guys my 2 hints. |
I got the same error on macOS now. After called by Electron-packager and copied part of the files, fs-extra silently quitted without calling the callback. Also, the last copied file varies and doesn't seem to be the cause. |
We're now on v5, and copy has changed a lot since then. Assuming this is fixed and closing. |
Can confirm this issue seems to have been fixed with v5 of fs-extra. |
This is an upstream issue report from electron-packager#544 and in particular this comment. The issue exists in both 1.0 and 2.0 versions.
electron-packager is a cli helper that packages an electron app. It does so by copying a node app (including node_modules) to the temp directory. This step uses
fs.copy
which silently fails. Neither the callback is called, nor an error is thrown.This is the line which fails silently
I'd be glad to help you identify root cause of this issue. My current guess that it's combination of filter/dereference and maybe (?) long paths?
Note that this only happens on windows. On OSX, packaging the project works fine.
The text was updated successfully, but these errors were encountered: