These are chat archives for rosshinkley/nightmare

26th
May 2016
Hudson Atwell
@atwellpub
May 26 2016 00:00
Hi hello Ross hope you're well.
My bot is complete and it's very lovely. YAY

I do have a question if you have a moment and I'll leave it here with you. I installed on dreamhost server that is node ready where I am running my other node servers and it's misbehaving.

It works locally but on dreamhost It doesn't like any instance of => in my code so when I removed them it throws this error:

 /home/hatnohat/bot.animallover.co/public/node_modules/nightmare/lib/nightmare.js:75
data:    animallover.js:25437 -   this.proc.stdout.pipe(split2()).on('data', (data) => {
data:    animallover.js:25437 -                                                     ^^
data:    animallover.js:25437 - SyntaxError: Unexpected token =>
data:    animallover.js:25437 -     at exports.runInThisContext (vm.js:73:16)
data:    animallover.js:25437 -     at Module._compile (module.js:443:25)
data:    animallover.js:25437 -     at Object.Module._extensions..js (module.js:478:10)
data:    animallover.js:25437 -     at Module.load (module.js:355:32)
data:    animallover.js:25437 -     at Function.Module._load (module.js:310:12)
data:    animallover.js:25437 -     at Module.require (module.js:365:17)
data:    animallover.js:25437 -     at require (module.js:384:17)
data:    animallover.js:25437 -     at Object.app.loadRequirements (/home/hatnohat/bot.animallover.co/public/animallover.js:63:33)
data:    animallover.js:25437 -     at Object.app.init (/home/hatnohat/bot.animallover.co/public/animallover.js:54:21)
data:    animallover.js:25437 -     at Object.<anonymous> (/home/hatnohat/bot.animallover.co/public/animallover.js:554:9)
data:    animallover.js:25437 - error: Forever detected script exited with code: 1
data:    animallover.js:25583 - /home/hatnohat/bot.animallover.co/public/node_modules/nightmare/lib/nightmare.js:75
data:    animallover.js:25583 -   this.proc.stdout.pipe(split2()).on('data', (data) => {
data:    animallover.js:25583 -                                                     ^^
data:    animallover.js:25583 - SyntaxError: Unexpected token =>
data:    animallover.js:25583 -     at exports.runInThisContext (vm.js:73:16)
data:    animallover.js:25583 -     at Module._compile (module.js:443:25)
data:    animallover.js:25583 -     at Object.Module._extensions..js (module.js:478:10)
data:    animallover.js:25583 -     at Module.load (module.js:355:32)
data:    animallover.js:25583 -     at Function.Module._load (module.js:310:12)
data:    animallover.js:25583 -     at Module.require (module.js:365:17)
data:    animallover.js:25583 -     at require (module.js:384:17)
data:    animallover.js:25583 -     at Object.app.loadRequirements (/home/hatnohat/bot.animallover.co/public/animallover.js:63:33)
data:    animallover.js:25583 -     at Object.app.init (/home/hatnohat/bot.animallover.co/public/animallover.js:54:21)
data:    animallover.js:25583 -     at Object.<anonymous> (/home/hatnohat/bot.animallover.co/public/animallover.js:554:9)
data:    animallover.js:25583 - error: Forever detected script exited with code: 1
data:    animallover.js:25632 - /home/hatnohat/bot.animallover.co/public/node_modules/nightmare/lib/nightmare.js:75
data:    animallover.js:25632 -   this.proc.stdout.pipe(split2()).on('data', (data) => {
data:    animallover.js:25632 -                                                     ^^
data:    animallover.js:25632 - SyntaxError: Unexpected token =>
data:    animallover.js:25632 -     at exports.runInThisContext (vm.js:73:16)
data:    animallover.js:25632 -     at Module._compile (module.js:443:25)
data:    animallover.js:25632 -     at Object.Module._extensions..js (module.js:478:10)
data:    animallover.js:25632 -     at Module.load (module.js:355:32)
data:    animallover.js:25632 -     at Function.Module._load (module.js:310:12)
data:    animallover.js:25632 -     at Module.require (module.js:365:17)
data:    animallover.js:25632 -     at require (module.js:384:17)
data:    animallover.js:25632 -     at Object.app.lo
Any ideas?
Ross Hinkley
@rosshinkley
May 26 2016 01:15
sounds like it's running an old version of node, if i had to guess
fat-arrow (=>) works with node 0.12.x with --harmony and >4
you'll want >4, though
Hudson Atwell
@atwellpub
May 26 2016 19:11
My local is >4 and my server is 0.12.x
great eyes Ross
Ross Hinkley
@rosshinkley
May 26 2016 19:11
:)
Hudson Atwell
@atwellpub
May 26 2016 19:11
Now to figure out how to upgrade the server
Ross Hinkley
@rosshinkley
May 26 2016 19:11
dreamhost, right?
i think it supports nvm out of the box... you should be able to switch node versions with that pretty easily