question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

fs.copy silently fails on windows

See original GitHub issue

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.

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
RyanZimcommented, Feb 17, 2017

@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.

2reactions
aeneasrcommented, Feb 24, 2017

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does my file copy silently fail on explorer on Windows ...
If I drag the files to copy them using explorer, or right click to copy and paste even, nothing happens - no dialog,...
Read more >
Why does Perl's File::Copy appear to silently fail?
It uses File::Copy's move function to move a directory tree to another place on the same drive. The script fails (silently) on Windows...
Read more >
Silently copy files in Windows without showing error popup ...
Select the “General” tab and enable the option “Run silently”. This option ensures that you are not asked any questions when copying files....
Read more >
A file copy operation fails when files or folders have long paths ...
The copy operation fails and generates a message that states that the path (file name) is too long. The message also suggests that...
Read more >
Deploy Google Drive for desktop
Download the .exe file and deploy it in silent mode: Windows ... If you have problems installing Drive for desktop, restart the computer...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found