trailsjs / trailpack-autoreload

:package: Reload Trails on Code Changes
MIT License
5 stars 3 forks source link

Error #1

Open jaumard opened 8 years ago

jaumard commented 8 years ago

With the npm version 1.0.1 I have this error when sources are reloaded :

TypeError: Cannot redefine property: inspect
    at Function.defineProperty (native)
    at Object.configureApp (/Users/jaumard/Downloads/testTrails/node_modules/trailpack-repl/lib/inspect.js:65:12)
    at REPL.configure (/Users/jaumard/Downloads/testTrails/node_modules/trailpack-repl/index.js:17:17)
    at /Users/jaumard/Downloads/testTrails/node_modules/trails/lib/trailpack.js:56:26
    at process._tickDomainCallback (node.js:407:9)
jaumard commented 8 years ago

If I disable repl I have another similar error under core trailpack :

error: 
 TypeError: Cannot redefine property: __
    at Function.defineProperty (native)
    at /Users/jaumard/Downloads/testTrails/node_modules/trailpack-core/index.js:41:14
    at process._tickCallback (node.js:364:9)
debug: trails event: trails:stop
tjwebb commented 8 years ago

I updated trailpack-core to fix this; will publish an updated version soon.

jaumard commented 8 years ago

Now I have this :

error: 
 TypeError: this.once is not a function
    at AutoreloadTrailpack.initialize (/Users/jaumard/Downloads/testTrails/node_modules/trailpack-autoreload/index.js:43:10)
    at /Users/jaumard/Downloads/testTrails/node_modules/trails/lib/trailpack.js:51:26
    at process._tickDomainCallback (node.js:407:9)
jaumard commented 8 years ago

Ok this error append because npm doesn't install the good version of trailpack https://github.com/trailsjs/trailpack-autoreload/blob/master/package.json#L19 after another install this error disapear.

But now another error ^^ here https://github.com/trailsjs/trailpack-autoreload/blob/master/index.js#L44 Maybe it's this.app.packs.repl right ? Because for now I have TypeError: Cannot read property 'repl' of undefined

tjwebb commented 8 years ago

Weird, that looks like a bug anyway. You're right, it should be this.app.packs. I think I'll add the packs property to Trailpack, though, for convenience.