You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When packaging for windows target with electron 1.4.14 and electron-builder 11.2.5 the module couldn't be found, more specifically it couldn't find nircmd.exe.
I think path.join should normally look in app.asar.unpacked, but apparantly on Windows it doesn't?
Solution/Workaround:
I had to change the line in win32.js from var nircmd = childProcess.spawn(path.join(__dirname, "bin", "nircmd.exe"), ["savescreenshot", options.output]);
to var nircmd = childProcess.spawn(path.join(__dirname.replace('app.asar', 'app.asar.unpacked'), "bin", "nircmd.exe"), ["savescreenshot", options.output]);
When packaging for windows target with electron 1.4.14 and electron-builder 11.2.5 the module couldn't be found, more specifically it couldn't find nircmd.exe.
I think path.join should normally look in app.asar.unpacked, but apparantly on Windows it doesn't?
Solution/Workaround:
I had to change the line in win32.js from
var nircmd = childProcess.spawn(path.join(__dirname, "bin", "nircmd.exe"), ["savescreenshot", options.output]);
to
var nircmd = childProcess.spawn(path.join(__dirname.replace('app.asar', 'app.asar.unpacked'), "bin", "nircmd.exe"), ["savescreenshot", options.output]);
Also:
The text was updated successfully, but these errors were encountered: