mongodb-js / electron-squirrel-startup

Default Squirrel.Windows event handler for your Electron apps.
Apache License 2.0
217 stars 41 forks source link

Cannot find module 'electron-squirrel-startup' #20

Closed kuworking closed 7 years ago

kuworking commented 7 years ago

When adding the line

if (require('electron-squirrel-startup')) return;

I have this error message. Tried by running

npm i electron-squirrel-startup
electron-squirrel-startup --save
electron-squirrel-startup --save-dev

In all three cases I get the same message. I've even tried to move the module manually to the /resources folder into the packaged app. This has worked with another external module that is not packaged I don't know why, but hasn't worked in this case.

What can I do?

rgl commented 7 years ago

there is something wrong with your setup. here npm install --save electron-squirrel-startup works just fine. try setting the environment variable DEBUG='*' before running anything, maybe there is some clue there.

jvalente commented 7 years ago

@KYSSelectron what seemed to be the problem?

kuworking commented 7 years ago

@jvalente, Don't really know (I moved to electron-builder), but I would say I was doing some newbie error like not installing the package (not running the install command) in the right directory. I will try to spend some time later to see if that was the case, but as I say, knowing the mistakes I was doing a couple of weeks ago I wouldn't be surprised (at all).

develar commented 7 years ago

To let users just make cool Electron apps and do not worry about handling Squirrel.Windows events, app icon uploading, XML escaping and other "pleasurable" stuff, electron-builder introduces NSIS support and NSIS target is the default target for windows since v10.