joaomoreno/gulp-atom-electron

Error while creating Electron app package on Windows 8

JW-Vinayak opened this issue · 6 comments

Hi,

I am using following code to package my electron app.

var atomelectron = require('gulp-atom-electron'),
  os = require('os');
gulp.task('make', function () {
  var prop = {
    version: '0.26.1',
    platform: os.platform()
  }
  if (os.platform() === 'darwin') {
    prop.darwinIcon = 'icon.icns';    
  }
  else {
    // properties related to windows executables       
    prop.arch = "x64";
  }  
  return gulp.src('src/**')
      .pipe(atomelectron (prop))
      .pipe(atomelectron .zfsdest('app.zip'))     
      .on('end', function() { console.log('Your app package is ready.') })      
});

Works perfectly on Mac but gives following error on Windows 8.

[15:27:51] Starting 'make'...
↓ electron-v0.26.1-win32-ia32.zip [=-------------------] 5%events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: EISDIR, read
    at Error (native)

Can't seem to reproduce. Also, your code looks like it would download x64 for Windows, but your console output shows that it is downloading ia32. What's up with that?

Also, do you have any symlinks inside src?

I had tried with both "arch" options, producing the same error as given above. While pasting the code here I must have made some mistake. But the output error remains the same.

There are no symlinks inside src. In case if we add any symlinks in future, what difference will it make?

It shouldn't... it's just a hunch. Kind of hard without any more details.

Can you try deleting the %TMP%\gulp-electron-cache directory and retrying?

Ok I did try deleting the cache directory. It failed with same error, after downloading 100% of the binary file though.

Deleted cache directory again and tried it for a smaller application. It worked.

Not sure what is causing this error in my actual application. Thanks for the pointers though.

I used gulp-debug just before electron.zfsdest to locate the file/folder that triggers the error. Turns out that inside one package there was this UNMET DEPENDENCY (that's the description that came after I did npm list). This shortcut/symlink file present was causing this error.

Once I removed this dev dependency node module, the code worked as expected.

image

Pretty awesome you managed to find that out! Thanks.