yan-foto/electron-reload

electron-reload doesn't work when it's installed globally.

FirstProphet opened this issue · 1 comments

The following error shows up, when I install electron-reload globally:

App threw an error during load
Error: Cannot find module 'electron-reload'
    at Module._resolveFilename (module.js:485:15)
    at Function.Module._resolveFilename (C:\Users\Jonas\AppData\Roaming\npm\node_modules\electron\dist\resources\electron.asar\common\reset-search-paths.js:35:12)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Users\Jonas\Documents\Programming\Electron\APIDemosStudy\main.js:3:1)
    at Object.<anonymous> (C:\Users\Jonas\Documents\Programming\Electron\APIDemosStudy\main.js:10:3)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)

When I install it locally, however, it works as expected.

This is the expected behavior. NodeJS does not load global modules using require. See this answer.