Cannot load native extension when using asar
See original GitHub issueELECTRON_ASAR.js:158 Uncaught Error: The specified module could not be found. ?\C:\Users<User Name>\AppData\Local\Temp<RANDOM>.tmp.node
And I can found it in this path…
I think the \\?\
is unnecessary…
It appears only when I use this option --asar=true
Which version of electron-packager are you using?
7.3.0
What CLI arguments are you passing? Alternatively, if you are using the API, what parameters are you passing to the
packager()
function?
electron-packager . “VizMusicPlayer” --out=dist/win --platform=win32 --arch=x64 --version=1.2.7 --icon=build/icon.ico --asar=true
What version of Electron are you building with?
1.2.7
What is the host platform are you running electron-packager on?
Windows 10 x64
What target platform(s)/architecture(s) are you building for?
Windows x64
Is there a stack trace in the error message you’re seeing?
(RUNTIME, Electron Renderer Process)
ELECTRON_ASAR.js:158
Uncaught Error: The specified module could not be found.
\\?\C:\Users\<User Name>\AppData\Local\Temp\<RANDOM>.tmp.node
Please provide either a failing testcase or detailed steps to reproduce your problem.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:12 (6 by maintainers)
Top GitHub Comments
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.
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