itemsapi / dashboard

Interactive user interface for your data in ItemsAPI
MIT License
21 stars 18 forks source link

Heroku deployment button does not deploy working version to Heroku #16

Closed aaronshim closed 7 years ago

aaronshim commented 8 years ago

I clicked on the button and followed the prompts on the Heroku page it redirected me to. No default options were changed.

However, when I try to visit the app running on Heroku, I get the error

An error occurred in the application and your page could not be served. Please try again in a few moments.

When I check the Heroku logs, I see the messages

2016-09-30T07:24:39.282274+00:00 heroku[slug-compiler]: Slug compilation started
2016-09-30T07:24:39.282281+00:00 heroku[slug-compiler]: Slug compilation finished
2016-09-30T07:24:41.789190+00:00 heroku[web.1]: Starting process with command `npm start`
2016-09-30T07:24:45.097942+00:00 heroku[web.1]: Process exited with status 1
2016-09-30T07:24:44.775058+00:00 app[web.1]:
2016-09-30T07:24:44.775072+00:00 app[web.1]: > itemsapi-starter@1.0.1 start /app
2016-09-30T07:24:44.775073+00:00 app[web.1]: > node app.js
2016-09-30T07:24:44.775073+00:00 app[web.1]:
2016-09-30T07:24:44.943049+00:00 app[web.1]: /app/app.js:5
2016-09-30T07:24:44.943053+00:00 app[web.1]: itemsapi.get('logger').info('it works!')
2016-09-30T07:24:44.943054+00:00 app[web.1]:                       ^
2016-09-30T07:24:44.943054+00:00 app[web.1]:
2016-09-30T07:24:44.943055+00:00 app[web.1]: TypeError: Cannot read property 'info' of undefined
2016-09-30T07:24:44.943056+00:00 app[web.1]:     at Object.<anonymous> (/app/app.js:5:23)
2016-09-30T07:24:44.943057+00:00 app[web.1]:     at Module._compile (module.js:413:34)
2016-09-30T07:24:44.943057+00:00 app[web.1]:     at Object.Module._extensions..js (module.js:422:10)
2016-09-30T07:24:44.943058+00:00 app[web.1]:     at Module.load (module.js:357:32)
2016-09-30T07:24:44.943059+00:00 app[web.1]:     at Function.Module.runMain (module.js:447:10)
2016-09-30T07:24:44.943058+00:00 app[web.1]:     at Function.Module._load (module.js:314:12)
2016-09-30T07:24:44.943060+00:00 app[web.1]:     at startup (node.js:148:18)
2016-09-30T07:24:44.943065+00:00 app[web.1]:     at node.js:405:3
2016-09-30T07:24:44.952815+00:00 app[web.1]:
2016-09-30T07:24:44.964618+00:00 app[web.1]: npm ERR! Linux 3.13.0-93-generic
2016-09-30T07:24:44.965164+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2016-09-30T07:24:44.965502+00:00 app[web.1]: npm ERR! node v5.11.1
2016-09-30T07:24:44.966199+00:00 app[web.1]: npm ERR! npm  v3.8.6
2016-09-30T07:24:44.966664+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2016-09-30T07:24:44.966848+00:00 app[web.1]: npm ERR! itemsapi-starter@1.0.1 start: `node app.js`
2016-09-30T07:24:44.967012+00:00 app[web.1]: npm ERR! Exit status 1
2016-09-30T07:24:44.967200+00:00 app[web.1]: npm ERR!
2016-09-30T07:24:44.967412+00:00 app[web.1]: npm ERR! Failed at the itemsapi-starter@1.0.1 start script 'node app.js'.
2016-09-30T07:24:44.967659+00:00 app[web.1]: npm ERR! Make sure you have the latest version of node.js and npm installed.
2016-09-30T07:24:44.967894+00:00 app[web.1]: npm ERR! If you do, this is most likely a problem with the itemsapi-starter package,
2016-09-30T07:24:44.968091+00:00 app[web.1]: npm ERR! not with npm itself.
2016-09-30T07:24:44.968376+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2016-09-30T07:24:44.968498+00:00 app[web.1]: npm ERR!     node app.js
2016-09-30T07:24:44.968868+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with:
2016-09-30T07:24:44.968871+00:00 app[web.1]: npm ERR!     npm bugs itemsapi-starter
2016-09-30T07:24:44.969072+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via:
2016-09-30T07:24:44.969577+00:00 app[web.1]: npm ERR!     npm owner ls itemsapi-starter
2016-09-30T07:24:44.969825+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2016-09-30T07:24:44.976783+00:00 app[web.1]:
2016-09-30T07:24:44.977054+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2016-09-30T07:24:44.977197+00:00 app[web.1]: npm ERR!     /app/npm-debug.log
2016-09-30T07:24:45.121730+00:00 heroku[web.1]: State changed from starting to crashed

Could someone confirm reproducible and suggest steps to troubleshoot this?

aaronshim commented 8 years ago

Never mind, found that the Heroku button link found on https://itemsapi.readme.io/docs/getting-started and https://www.itemsapi.com/docs/tutorials/search-backend-for-restaurants-itemsapi-elasticsearch-nodejs are bad, but the one found on the README of this repository is ok.

I think the difference is that the button in this repo tries to deploy the itemsapi/dashboard repo, but the buttons in the other documentation try to deploy the itemsapi/itemsapi-starter repo. Is there a reason why this repository works but the other one does not?

cigolpl commented 8 years ago

Hello Aaron, thanks for your insight. It is very helpful! Yeah, there was an small issue here itemsapi/itemsapi-starter but it is fixed now (https://github.com/itemsapi/itemsapi-starter/commit/ca117191b13ad889ed182a4816d89a1c953f5f12).

Also small clarification: https://github.com/itemsapi/dashboard - web dashboard for quick and interactive adding and exploring json data. In the longterm maybe also managing data. Good for testing ItemsAPI backend and exploring data.

https://github.com/itemsapi/itemsapi-starter - minimalistic search API creator. It was intended to help developers create search API step by step with guides. Still in basic version. Can be also good for creating standalone search oriented Express.js application