johnhammerlund / hubot-proxy

A hubot adapter event listener that sits inbetween hubot and the desired hubot adapter.
12 stars 3 forks source link

TypeError: object is not a function #2

Open come-maiz opened 8 years ago

come-maiz commented 8 years ago

I tried to add this script to my deploy in heroku. It fails with the following message:

2016-03-19T21:22:12.821340+00:00 heroku[slug-compiler]: Slug compilation started [164/636] 2016-03-19T21:22:12.821351+00:00 heroku[slug-compiler]: Slug compilation finished 2016-03-19T21:22:12.683192+00:00 heroku[api]: Deploy d35b6f1 by yo@elopio.net 2016-03-19T21:22:12.683217+00:00 heroku[api]: Release v16 created by yo@elopio.net 2016-03-19T21:22:12.921948+00:00 heroku[web.1]: State changed from crashed to starting 2016-03-19T21:22:14.120372+00:00 heroku[web.1]: Starting process with command bin/hubot -a telegram 2016-03-19T21:22:16.457550+00:00 app[web.1]: npm WARN deprecated This version of npm lacks support for important features, 2016-03-19T21:22:16.457741+00:00 app[web.1]: npm WARN deprecated such as scoped packages, offered by the primary npm 2016-03-19T21:22:16.458070+00:00 app[web.1]: npm WARN deprecated registry. Consider upgrading to at least npm@2, if not the 2016-03-19T21:22:16.458248+00:00 app[web.1]: npm WARN deprecated latest stable version. To upgrade to npm@2, run: 2016-03-19T21:22:16.458362+00:00 app[web.1]: npm WARN deprecated 2016-03-19T21:22:16.458553+00:00 app[web.1]: npm WARN deprecated npm -g install npm@latest-2 2016-03-19T21:22:16.458745+00:00 app[web.1]: npm WARN deprecated 2016-03-19T21:22:16.458933+00:00 app[web.1]: npm WARN deprecated To upgrade to the latest stable version, run: 2016-03-19T21:22:16.460067+00:00 app[web.1]: npm WARN deprecated 2016-03-19T21:22:16.460075+00:00 app[web.1]: npm WARN deprecated npm -g install npm@latest 2016-03-19T21:22:16.460076+00:00 app[web.1]: npm WARN deprecated 2016-03-19T21:22:16.460076+00:00 app[web.1]: npm WARN deprecated (Depending on how Node.js was installed on your system, you 2016-03-19T21:22:16.460077+00:00 app[web.1]: npm WARN deprecated may need to prefix the preceding commands with sudo, or if 2016-03-19T21:22:16.460078+00:00 app[web.1]: npm WARN deprecated on Windows, run them from an Administrator prompt.) 2016-03-19T21:22:16.460078+00:00 app[web.1]: npm WARN deprecated 2016-03-19T21:22:16.460079+00:00 app[web.1]: npm WARN deprecated If you're running the version of npm bundled with 2016-03-19T21:22:16.460080+00:00 app[web.1]: npm WARN deprecated Node.js 0.10 LTS, be aware that the next version of 0.10 LTS 2016-03-19T21:22:16.460172+00:00 app[web.1]: npm WARN deprecated will be bundled with a version of npm@2, which has some small 2016-03-19T21:22:16.460340+00:00 app[web.1]: npm WARN deprecated backwards-incompatible changes made to npm run-script and 2016-03-19T21:22:16.460458+00:00 app[web.1]: npm WARN deprecated semver behavior. 2016-03-19T21:22:18.272292+00:00 app[web.1]: [Sat Mar 19 2016 21:22:18 GMT+0000 (UTC)] DEBUG Loading adapter telegram 2016-03-19T21:22:18.698083+00:00 app[web.1]: [Sat Mar 19 2016 21:22:18 GMT+0000 (UTC)] INFO Telegram Adapter Bot 191708262:AAHYGZXUK7ab1Ii0BEk4wjov44nxyk8AoIU Loaded... 2016-03-19T21:22:18.707155+00:00 app[web.1]: [Sat Mar 19 2016 21:22:18 GMT+0000 (UTC)] INFO Telegram Adapter Started... 2016-03-19T21:22:18.707634+00:00 app[web.1]: [Sat Mar 19 2016 21:22:18 GMT+0000 (UTC)] DEBUG Loading scripts from /app/scripts 2016-03-19T21:22:18.709959+00:00 app[web.1]: [Sat Mar 19 2016 21:22:18 GMT+0000 (UTC)] DEBUG Parsing help for /app/scripts/example.coffee 2016-03-19T21:22:18.710730+00:00 app[web.1]: [Sat Mar 19 2016 21:22:18 GMT+0000 (UTC)] DEBUG Loading scripts from /app/src/scripts 2016-03-19T21:22:18.711083+00:00 app[web.1]: [Sat Mar 19 2016 21:22:18 GMT+0000 (UTC)] DEBUG Loading hubot-scripts from /app/node_modules/hubot-scripts/src/scripts 2016-03-19T21:22:18.745514+00:00 app[web.1]: [Sat Mar 19 2016 21:22:18 GMT+0000 (UTC)] DEBUG Loading external-scripts from npm packages 2016-03-19T21:22:18.943130+00:00 app[web.1]: [Sat Mar 19 2016 21:22:18 GMT+0000 (UTC)] ERROR Error loading scripts from npm package - TypeError: object is not a function 2016-03-19T21:22:18.943153+00:00 app[web.1]: at Robot.loadExternalScripts (/app/node_modules/hubot/src/robot.coffee:401:11, :272:39) 2016-03-19T21:22:18.943155+00:00 app[web.1]: at /app/node_modules/hubot/bin/hubot:119:11, :126:26 2016-03-19T21:22:18.943156+00:00 app[web.1]: at fs.js:272:14 2016-03-19T21:22:18.943157+00:00 app[web.1]: at Object.oncomplete (fs.js:108:15) 2016-03-19T21:22:18.943158+00:00 app[web.1]: 2016-03-19T21:22:19.755253+00:00 heroku[web.1]: Process exited with status 1

ramaboggarapu commented 8 years ago

I get same error when deploying to IBM Bluemix: 2016-05-10T13:14:50.40-0400 [App/0] OUT [Tue May 10 2016 17:14:50 GMT+0000 (UTC)] ERROR Error loading scripts from npm package - TypeError: object is not a function 2016-05-10T13:14:50.40-0400 [App/0] OUT at Robot.loadExternalScripts (/home/vcap/app/node_modules/hubot/src/robot.coffee:401:11, :272:39) 2016-05-10T13:14:50.40-0400 [App/0] OUT at /home/vcap/app/node_modules/hubot/bin/hubot:152:11, :159:26 2016-05-10T13:14:50.40-0400 [App/0] OUT at fs.js:272:14 2016-05-10T13:14:50.40-0400 [App/0] OUT at Object.oncomplete (fs.js:108:15)

ramaboggarapu commented 8 years ago

I was able to resolve the issue by fixing an invalid entry in external-scripts.json