trailsjs / trailpack-repl

:package: REPL Trailpack
MIT License
8 stars 1 forks source link

Second live reload crahes the app when trailpack-repl and trailpack-webpack are enabled. #24

Closed zuker closed 8 years ago

zuker commented 8 years ago

config/main.js

{
...
  packs: [
    require('trailpack-repl'),
    require('trailpack-webpack'),
    require('trailpack-autoreload')
  ]
...
}

When second autoreload triggered:

debug: Unloading trailpack repl
trailpack-repl/index.js:78
    this.server.removeAllListeners('exit')
               ^

TypeError: Cannot read property 'removeAllListeners' of undefined
    at REPL.unload (trailpack-repl/index.js:78:16)
...
tjwebb commented 8 years ago

Strange, I didn't find this in testing. Which version of node are you running?

tjwebb commented 8 years ago

This may have been broken at one point, but this.server should not be undefined. See https://github.com/trailsjs/trailpack-repl/commit/75450edf821d2b30ce3b3a0955cdb91ed8d530ee

zuker commented 8 years ago

@tjwebb just tried with:

"trailpack-repl": "^1.0.0-beta-4",
"trailpack-router": "^1.0.0-beta-4",
"trailpack-webpack": "https://github.com/trailsjs/trailpack-webpack/tarball/master"
"trailpack-autoreload": "^1.0.2",

Everything works perfectly! Tanks!

tjwebb commented 8 years ago

ok, so the repl version was just old?

zuker commented 8 years ago

Sorry, can't clearly confirm that it was version issue, but it seems yes.

jaumard commented 8 years ago

Look fixed, closing this, feel free to reopen if it's not :) thanks