Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure to start: Cannot find module 'electron-localShortcut' #2

Closed
zsturgess opened this issue Jul 28, 2017 · 1 comment
Closed

Failure to start: Cannot find module 'electron-localShortcut' #2

zsturgess opened this issue Jul 28, 2017 · 1 comment

Comments

@zsturgess
Copy link

I'm running on Ubuntu 16.04. A 'npm start' yeilds:

Warning, the following targets are using a decimal version:

  electron: 1.6

We recommend using a string for minor/patch versions to avoid numbers like 6.10
getting parsed as 6.1, which can lead to unexpected behavior.

App threw an error during load
Error: Cannot find module 'electron-localShortcut'
    at Module._resolveFilename (module.js:470:15)
    at Function.Module._resolveFilename (/home/zac/Documents/Projects/Personal/hyde/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/zac/Documents/Projects/Personal/hyde/main.js:19:21)
    at Object.<anonymous> (/home/zac/Documents/Projects/Personal/hyde/main.js:263:3)
    at Module._compile (module.js:571:32)
    at Object.require.extensions.(anonymous function) [as .js] (/home/zac/Documents/Projects/Personal/hyde/node_modules/electron-compile/lib/require-hook.js:77:14)
    at Module.load (module.js:488:32)
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Cannot find module 'electron-localShortcut'
    at Module._resolveFilename (module.js:470:15)
    at Function.Module._resolveFilename (/home/zac/Documents/Projects/Personal/hyde/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/zac/Documents/Projects/Personal/hyde/main.js:19:21)
    at Object.<anonymous> (/home/zac/Documents/Projects/Personal/hyde/main.js:263:3)
    at Module._compile (module.js:571:32)
    at Object.require.extensions.(anonymous function) [as .js] (/home/zac/Documents/Projects/Personal/hyde/node_modules/electron-compile/lib/require-hook.js:77:14)
    at Module.load (module.js:488:32)

At which, the terminal just hangs.

The following seems to resolve:

diff --git a/main.js b/main.js
index 0b2474c..755b439 100644
--- a/main.js
+++ b/main.js
@@ -16,7 +16,7 @@ const keepInTray = config.get('keepInTray');
 const fs = require('fs');
 const path = require('path');
 const mainPage = path.join('file://', __dirname, '/index.html');
-var localShortcut = require('electron-localShortcut');
+var localShortcut = require('electron-localshortcut');
 const {Menu, MenuItem, ipcMain} = require('electron');
 // const window = require('./js/windowManager');
@tterb
Copy link
Owner

tterb commented Jul 28, 2017

Okay, I'll investigate this further today and get it squared away.
Thanks for letting me know

@tterb tterb closed this as completed in 9adccf5 Jul 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants