Cannot find module error after installer creation
See original GitHub issueWhat version of electron-installer-windows
are you using?
0.2.0
What version of node
and npm
are you using?
6.1.0 and 3.8.6
What operating system are you using? Windows 10
Can you compile the example app successfully? Yes
What did you do? Please include the configuration you are using for electron-installer-windows
.
{
"src": "./out/AppName-win32-x64/",
"dest": "./out/installers/",
"iconUrl": "https://url/img/icon.ico",
"icon": "./assets/images/logo.ico",
"tags": [
"Tag 1",
"Tag2",
"Tag3"
]
}
The installer is run with:
electron-installer-windows --src ./out/AppName-win32-x64/ --dest ./out/installers/ --config config.json
What did you expect to happen? Everything should work the same as when I start the app from the CLI.
What actually happened? When running the .exe I get an error:
I think it’s something to do with the windows-shortcuts
node_module
, but when I run the app before creating the installer everything works fine. When I try and run the installer it errors saying that the windows-shortcuts
node_module could not be found.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8
Top GitHub Comments
Okay, I don’t know what has happened but it now works fine! I switched to running via a script instead of command line through
npm run
and everything now works fine. I’ll keep doing some testing to make sure.I also made
windows-shortcuts
an optional dependency so that I could build on OSX too, but again I don’t think that will have changed anything. It’s definitely working.Annoyingly I don’t know what else I changed that might have made a difference. Sorry about that and thanks for your help on this and the awesome script!
No worries. Good luck with your project.