node-fs-extra: fs.copy silently fails on windows

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

fs.copy(opts.dir, appPath, {filter: ignore.userIgnoreFilter(opts), dereference: shouldDeref}, cb)

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.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 24 (5 by maintainers)

Most upvoted comments

@jprichardson Sometimes I wonder if we shouldn’t just escalate https://github.com/jprichardson/node-fs-extra/issues/292.

With native promise support in node 4+, messing with these counters just seems so wrong.

Maybe it could be pointed out in the readme! Otherwise good to close for me.

The issue does apparently no longer occur on node 7.6.0

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.