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

Fails to electron.reload() when preceded by other gulp tasks #71

Open
darkurse opened this issue Jan 3, 2017 · 2 comments
Open

Fails to electron.reload() when preceded by other gulp tasks #71

darkurse opened this issue Jan 3, 2017 · 2 comments

Comments

@darkurse
Copy link

darkurse commented Jan 3, 2017

Hi, I'm having an issue reloading successfully my electron app after a scss change. As you can imagine, I need to transform my scss resource into a css file, which implies a gulp task prior reloading the electron app.

In partitioning the issue I noticed that any gulp task prior electron.reload was resulting in a crash. ie: following 'watch' task triggers 'noop' then 'reload:renderer' tasks

gulp.task('watch', function () {
    gulp.watch([
        path.join(conf.paths.src, '/app/**/*.css'),
        path.join(conf.paths.src, '/app/**/*.scss')
    ], function (event) {

        gulp.start('noop')
            .pipe('reload:renderer')
    })
})

gulp.task('noop', function () {
});

gulp.task('reload:renderer', function (done) {
  // Reload renderer process
  electron.reload();
  done();
});

Am I missing something ?

@Jaeiya
Copy link

Jaeiya commented Feb 11, 2017

+1
I'm having the same issue. I watch for changes and as soon as a file is changed, I get the following when electron tries to reload:
TypeError: ids.forEach is not a function

edit
Though I have to add, even if I update a css file manually, I still get the same error. My client is being created in the browser process. I'm using Electron version 1.4.15

@altsanz
Copy link

altsanz commented Jan 9, 2018

@darkurse Did you manage to solve this. I get an ECONNRESET on gulp from NPM when reloading.

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

3 participants