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 'debug' #27

Closed Samuell1 closed 6 years ago

anuprajg commented 7 years ago

Is this somehow resolved ?

Samuell1 commented 7 years ago

I think no

anuprajg commented 7 years ago

Got it working by removing all the Debug statements from the code...

Samuell1 commented 7 years ago

I created switch with squirrel args, its same but any depedencies dont needed

mblundred-yseop commented 7 years ago

I'm having this problem too when using squirrel-winstaller to generate a .exe setup file.

The debug package version ^2.2.0 has been correctly packaged inside my node_modules/ folder in the AppData directory, but when running my application I get the following error:

image

Annoyingly I can't expand the error box, but I'm pretty sure the problem is encountered at line 3 of index.js

var debug = require('debug')('electron-squirrel-startup');

I have had this problem intermittently, I'll try to remember to post in this ticket if I figure out precisely what the problem is or how to replicate it.


EDIT

Figured it out! So I'm packaging an Angular 2 application and I configured electron-packager to ignore both my quark/electron/releases/ directory and the quark/src/ directory (quark is just what I've called my app). If I don't package the source code I can replicate this error, and it's fixed when reincluding it. The debug module's package.json compiled in the AppData folder has its main and browser options set to ./src/main.js and ./src/browser.js respectively. This caused electron-squirrel-startup's dependency to the debug package to break when not including the src/ directory when using electron-packager.

roman0x58 commented 7 years ago

I think the debug dependency should be removed, because the script used in the final app, and many users don't wanna attach all dependencies from node_modules

matthewtmoran commented 7 years ago

Any progress on this issue? Extremely frustrating.

CommanderGL commented 1 year ago

you have to edit .npmrc to look like this:

node-linker=hoisted
public-hoist-pattern=*
shamefully-hoist=true