fs.copy silently fails on windows
See original GitHub issueThis 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:
- Created 7 years ago
- Comments:24 (5 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@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.