question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot find module error after installer creation

See original GitHub issue

What 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:

image

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:closed
  • Created 7 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
ahallickscommented, May 20, 2016

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!

0reactions
unindentedcommented, May 20, 2016

No worries. Good luck with your project.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I resolve "Cannot find module" error using Node.js?
Using npm install installs the module into the current directory only (in a subdirectory called node_modules ). Is app.js located under ...
Read more >
Fix Global Installs Not Working | "Cannot find module" error FIX
Getting " Cannot find module " after installing something globally (with -g)? Well, this video shows you how to fix global package/module ...
Read more >
cannot find module [Node npm Error Solved] - freeCodeCamp
When you get the “cannot find module” error, or “module not found”, it means you've not installed the package you're trying to use....
Read more >
I get tons of errors when i run npm install and stencil init ...
Looks like a problem with node-gyp. You might try uninstalling that and re-installing. Or node altogether perhaps. Expand Post.
Read more >
How to resolve "Cannot find module" error in Node - Sabe.io
The Cannot find module error is a common error that usually happens when dependencies are not installed. Once you install your dependencies and ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found