Open Kaffiend opened 6 years ago
I can confirm this issue in my case too.
Changing line number 3 inside config/install-app-deps.js
from:
const installOrRebuild = require('electron-builder/out/util/yarn').installOrRebuild;
to:
const installOrRebuild = require('electron-builder-lib/out/util/yarn').installOrRebuild;
resolved issue for me.
so this happens when you install with npm
, instead of yarn. Both should be supported. yarn
does not install the electron-builder-lib
package but npm
does. Maybe we can change the build process to utilize the electron-builder install-app-deps
command instead or we can simply put in a quick fix to handle which ever exists after install for the correct path in the script.
Have you figured out why yarn
behaves differently from npm
?
Thanks for the tip about using yarn instead of npm. As a quick fix it worked great.
Till #32 fix is accepted, perhaps this?
try { // Try with yarn layout
installOrRebuild = require('electron-builder/out/util/yarn').installOrRebuild;
} catch (e) {
if (e.code !== 'MODULE_NOT_FOUND') {
throw e;
}
// Try with npm layout
installOrRebuild = require('electron-builder-lib/out/util/yarn').installOrRebuild;;
}
^ on
electron-builder
package, on fresh installs is pulling in a version that has a different structure and breaks theinstall-app-deps
helper.