yan-foto/electron-reload

Electron could not be found. No hard resets for you

youyinnn opened this issue · 2 comments

NOTE: before openning an issue, please consult previous issues (both open and closed).

What is the problem

It just dosen't work

How to reproduce

I just follow the Usage and then it happened

Additional information

win10
latest node,electron

I just figure it out

my main.js path is '/myproject/src/js/main.js'

so the __dirname is pointing at '/myproject/src/js'

so the code:

require('electron-reload')(__dirname, {
    electron: path.join(__dirname, 'node_modules', '.bin', 'electron.cmd')
})

is go down to '/myproject/src/js/node_modules/.bin/electron.cmd'

so i replace the __dirname to process.cwd() and it works.

Duplicate of #25, #33, and #49