Error: write EPIPE occurring only when Electron Application is Built

643 views Asked by At

I am encountering an odd issue that I am hoping someone can shed some light into. I currently writing an Electron-React desktop application for windows. Part of this application requires that I extract icons from some executable files.

I am using https://www.npmjs.com/package/icon-promise (my module) to return Base64 image data as a promise. This works perfect when in development mode and I get the intended behavior. When I build the application using npm run build however, the functionality breaks. I wrote the following to try to determine the issue, and it simply returns Error: write EPIPE.

  try {
    var iconData = (await iconPromise.getIcon("a", resourcePath)).Base64ImageData;
  } catch(err) {
    alert(err);
  }

I looked into this a bit and it looks like it might be the result of the child_process.spawn() from the icon-promise module, though I am not able to determine why this only occurs when the application is built, nor how to get around this error. Any advise or pointers on how to get around this error would be greatly appreciated.

0

There are 0 answers