0

I am trying to deploy a mongo, node express app in heroku. It works on "heroku local" but it fails on "heroku open". any help?? thankyou for suggestions

those are the logs I got...

2022-10-30T18:44:09.848332+00:00 heroku[router]: at=info method=GET path="/api/path" host=poey.herokuapp.com request_id=b26ddb54-bedd-4ce6-a9cf-6e9e0fe041ea fwd="63.35.195.0" dyno=web.1 connect=0ms service=197ms status=404 bytes=380 protocol=http
2022-10-30T18:44:09.848843+00:00 app[web.1]: GET /api/path 404 2.054 ms - 136
2022-10-30T18:44:09.849145+00:00 app[web.1]: TypeError: Cannot read properties of undefined (reading '0')
2022-10-30T18:44:09.849145+00:00 app[web.1]: at eval (eval at wrap (/app/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:10:26)
2022-10-30T18:44:09.849146+00:00 app[web.1]: at eval (eval at wrap (/app/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:62:4)
2022-10-30T18:44:09.849146+00:00 app[web.1]: at template (eval at wrap (/app/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:65:7)
2022-10-30T18:44:09.849146+00:00 app[web.1]: at exports.renderFile (/app/node_modules/pug/lib/index.js:454:38)
2022-10-30T18:44:09.849147+00:00 app[web.1]: at exports.renderFile (/app/node_modules/pug/lib/index.js:444:21)
2022-10-30T18:44:09.849147+00:00 app[web.1]: at exports.__express [as engine] (/app/node_modules/pug/lib/index.js:493:11)
2022-10-30T18:44:09.849148+00:00 app[web.1]: at View.render (/app/node_modules/express/lib/view.js:135:8)
2022-10-30T18:44:09.849148+00:00 app[web.1]: at tryRender (/app/node_modules/express/lib/application.js:640:10)
2022-10-30T18:44:09.849148+00:00 app[web.1]: at Function.render (/app/node_modules/express/lib/application.js:592:3)
2022-10-30T18:44:09.849149+00:00 app[web.1]: at ServerResponse.render (/app/node_modules/express/lib/response.js:1008:7)
2022-10-30T18:44:09.850123+00:00 app[web.1]: 404
RusArtM
  • 1,116
  • 3
  • 15
  • 22
Pepe
  • 1
  • Hard to say without seeing a single line of code. But seemingly you are passing invalid data into one of your pug templates ... – derpirscher Oct 31 '22 at 10:40

0 Answers0