okize / hubot-frinkiac

Hubot plugin for Simpson's search engine Frinkiac
MIT License
16 stars 7 forks source link

Axios: Promise is not defined #1

Closed DVG closed 8 years ago

DVG commented 8 years ago

When hubot receives a query, it blows up with the following error:

2016-02-05T21:12:32.639322+00:00 app[web.1]: [Fri Feb 05 2016 16:12:32 GMT-0500 (EST)] ERROR ReferenceError: Promise is not defined
2016-02-05T21:12:32.639326+00:00 app[web.1]:   at Axios.request (/app/node_modules/hubot-frinkiac/node_modules/axios/lib/axios.js:62:17)
2016-02-05T21:12:32.639328+00:00 app[web.1]:   at TextListener.callback (/app/node_modules/hubot-frinkiac/src/frinkiac.coffee:86:5, <js>:95:14)
2016-02-05T21:12:32.639329+00:00 app[web.1]:   at executeListener (/app/node_modules/hubot/src/listener.coffee:65:11, <js>:53:19)
2016-02-05T21:12:32.639332+00:00 app[web.1]:   at Object.async.eachSeries (/app/node_modules/hubot/node_modules/async/lib/async.js:142:20)
2016-02-05T21:12:32.639330+00:00 app[web.1]:   at allDone (/app/node_modules/hubot/src/middleware.coffee:41:37, <js>:32:16)
2016-02-05T21:12:32.639327+00:00 app[web.1]:   at wrap (/app/node_modules/hubot-frinkiac/node_modules/axios/lib/helpers/bind.js:9:15)
2016-02-05T21:12:32.639335+00:00 app[web.1]:   at process._tickCallback (node.js:448:13)
2016-02-05T21:12:32.639333+00:00 app[web.1]:   at Object.async.reduce (/app/node_modules/hubot/node_modules/async/lib/async.js:268:15)
2016-02-05T21:12:32.639334+00:00 app[web.1]:   at /app/node_modules/hubot/src/middleware.coffee:46:7, <js>:35:22
2016-02-05T21:12:32.639331+00:00 app[web.1]:   at /app/node_modules/hubot/node_modules/async/lib/async.js:274:13
jeffbyrnes commented 8 years ago

I, too, have experience this.

okize commented 8 years ago

@DVG @jeffbyrnes are you running Hubot on an older version of node? I added a polyfill to support Promises in older versions in v1.1.3. Let me know if this doesn't fix the error.

jeffbyrnes commented 8 years ago

Yeah, running v0.10, just haven’t upgraded in a long while. The polyfill works, though! Gonna upgrade, as well; thanks for pointing that out.

okize commented 8 years ago

@jeffbyrnes :+1:

DVG commented 8 years ago

:+1: I was still on 0.10, updated and everything is great