Image abstraction layer- Doesn't work on heroku


#1

Hey all,

I’m so close to finishing the project but I can’t for the life of me figure out why it doesn’t work on heroku. It works fine locally on my home computer.

git https://github.com/a1mighty/image-abstraction
heroku https://fierce-basin-45328.herokuapp.com/images/

heroku log

please help?


#2

Your error originates here: https://github.com/a1mighty/image-abstraction/blob/master/app.js#L53. TypeError: Cannot read property 0 of undefined. Looks like body.value is undefined in your callback. Try to log the body to the console to inspect it’s shape.

Don’t be intimidated by the cryptic error message with the callstack etc. If you read at the beginning you’ll see app/app.js:53 which means in your project root in the folder app in the file app.js at line number 53 is your error happening. The rest is you call stack. It means as much as the function in app/app.js:53 has been called by Request._callback has been called by Request._self.callback etc etc. It can help you trace the origin or your error if you happen to have many functions in your code that call each other. I your case the function in app.js is the only function written by you. The rest of the functions belong to the node internals.


#3

So it turns out I forgot to add my microsoft api key to heroku
heroku config:set MICROSOFT_KEY=
lol small mistakes like this drive me crazy