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
feature:asarRelated to the ASAR featureneeds infoIssue reporter needs to provide more information for maintainers to take actionquestion ❓Question about using Electron Packager. Not supported in this issue tracker.
So... do you use electron-builder or electron-packager — electron-userland/electron-builder#580 ? It seems it is your app issue, not packaging tool issue.
@malept
I have try to add --asar.unpack=*.node, but Still Not Working.
ELECTRON_ASAR.js:158 Uncaught Error: The specified module could not be found.
\\?\D:\x\desktop\VizMusicPlayer\dist\win\Viz Music Player-win32-x64\resources\app.asar.unpacked\node_modules\sharp\build\Release\sharp.node
I think \\?\ is the core problem....\\?\ prefix should be delete
Try electron-packager 7.2.0 and use --asar-unpack instead of --asar.unpack. There was a change to asar options in 7.3.0 but it shouldn't have impacted functionality.
I can confirm that is an Asar issue not electron-packager issue, I am using asar programatically and having the same behaviour. Also I am having this issue on windows 7 but not on windows 10
After much searching and reading documentation --asar.unpack=*.{node,dll} on the electron-packager cli did the trick for me. Make sure you are rebuilding sharp as required before packaging.
feature:asarRelated to the ASAR featureneeds infoIssue reporter needs to provide more information for maintainers to take actionquestion ❓Question about using Electron Packager. Not supported in this issue tracker.
Activity
develar commentedon Jul 13, 2016
So... do you use electron-builder or electron-packager — electron-userland/electron-builder#580 ? It seems it is your app issue, not packaging tool issue.
malept commentedon Jul 13, 2016
@develar it's pretty obvious from the link that this person uses electron-packager, not electron-builder.
@codehz if you use
asar, you need to whitelist native extensions likesharp(they do not work, see the Electron docs for why). Check out the--asar.unpackparameter. According to another section in the same Electron docs, try--asar.unpack=*.node(I have not tested it though).[-]Uncaught Error: The specified module could not be found.[/-][+]Cannot load native extension when using asar[/+]codehz commentedon Jul 13, 2016
@malept
I have try to add --asar.unpack=*.node, but Still Not Working.
I think
\\?\is the core problem....\\?\prefix should be deletemalept commentedon Jul 13, 2016
Try electron-packager 7.2.0 and use
--asar-unpackinstead of--asar.unpack. There was a change to asar options in 7.3.0 but it shouldn't have impacted functionality.malept commentedon Jul 13, 2016
Also, with electron-packager 7.3.0, don't specify
--asar=trueand--asar.unpack=*.nodeat the same time.codehz commentedon Jul 13, 2016
I have used below(7.3.0)
(same as before)
and now using 7.2.0 try below
(Not work, same as before)
and this
The last one does work, but it does not used asar...
malept commentedon Jul 13, 2016
I'm not seeing a difference between the second and third command.
codehz commentedon Jul 13, 2016
Sorry, I have removed
--asar, but forget to update comment....malept commentedon Jul 13, 2016
Yes, for electron-packager 7.2.0 and below, it is required to use
--asarif you want asar support.This seems like a problem with the
asarmodule. Electron Packager does not transform the options that are passed to theasarmodule at all.drFabio commentedon Jul 27, 2016
I can confirm that is an Asar issue not electron-packager issue, I am using asar programatically and having the same behaviour. Also I am having this issue on windows 7 but not on windows 10
vuamitom commentedon Dec 22, 2017
Please note that this same error can be thrown if dll dependencies are not found for the native node module.
Details are in last comment on
electron/asar#129
Joeanca commentedon Sep 17, 2018
After much searching and reading documentation --asar.unpack=*.{node,dll} on the electron-packager cli did the trick for me. Make sure you are rebuilding sharp as required before packaging.