Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

enableLiveReload not working #289

Open
kneumei opened this issue Jan 12, 2018 · 5 comments
Open

enableLiveReload not working #289

kneumei opened this issue Jan 12, 2018 · 5 comments

Comments

@kneumei
Copy link

kneumei commented Jan 12, 2018

Whenever I try to use enableLiveReload(), I get a stack trace like this:

App threw an error during load
TypeError: global.globalCompilerHost.listenToCompileEvents(...).filter is not a function
    at enableLiveReloadNaive (C:\Users\Kyle\Documents\Github\electron-quick-start\node_modules\electron-compile\lib\live-reload.js:72:76)
    at enableLiveReload (C:\Users\Kyle\Documents\Github\electron-quick-start\node_modules\electron-compile\lib\live-reload.js:49:7)
    at enableLiveReload (C:\Users\Kyle\Documents\Github\electron-quick-start\node_modules\electron-compile\lib\index.js:35:12)
    at Object.<anonymous> (C:\Users\Kyle\Documents\Github\electron-quick-start\main.js:4:1)
    at Object.<anonymous> (C:\Users\Kyle\Documents\Github\electron-quick-start\main.js:67:3)

Steps to reproduce:

  1. git clone https://github.com/electron/electron-quick-start.git
  2. Edit package.json. change "electron": "~1.7.8" to "electron-prebuilt-compile": "1.8.2-beta.3"
  3. npm install
  4. Edit main.js. Set first to lines to
import {enableLiveReload} from 'electron-compile';
enableLiveReload();
  1. npm start
@kneumei
Copy link
Author

kneumei commented Jan 12, 2018

Follow up:

I did some digging around in electron-forge and found that if I do this in package.config and run npm start, things work for me.

  "main": "src/main.js",
  "scripts": {
    "start": "node ./node_modules/electron-prebuilt-compile/lib/cli.js ."
  },

@Knaackee
Copy link

I got the same error, but this does not help.

@isekaimaou1109
Copy link

yeah me too, need help !! tks in advanced

@chadbr
Copy link

chadbr commented Mar 11, 2020

@isekaimaou1109
Copy link

@isekaimaou1109 this project is deprecated...

image

https://github.com/electron-userland/electron-compile/blob/master/README.md

ok i understood and tks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants