Application Error on Heroku! Here is the Solution that worked for me …

Smruti Ranjan Badatya
2 min readDec 3, 2022

We often encounter application error problems on Heroku after deploying. This is often frustrating because the API works local but the moment we deploy, it gives an error. There can be various reasons for this. Like improper error handling, syntax error, and much more.

But I want to emphasize a very peculiar error that I once had.

If you are a video person, you can watch this video on youtube as well. https://www.youtube.com/watch?v=cOYhWfh8Sc4

Okay, let’s get straight to the point. The folder name change is not being tracked by the commit in Heroku. As a result, even if we push the correct folder name after changing it the change won't reflect on the folders in our server.

The best way to debug is by using this command in the terminal inside your project.

heroku logs
The output after — $heroku logs

Here, you can see what is the actual problem. In my case, it was the import failure due to different folder names of Controllers.

You can run bash inside Heroku using this command.

heroku run bash

Now, you can view the files & navigate using the bash commands like ls, cd

running ls command

Here, I figured out my error by looking into the error and then correcting the names of the folders.

Then, everything worked like butter. Thanks for reading my story. Hope this solved your error.

See ya next time!

Cheers!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Smruti Ranjan Badatya
Smruti Ranjan Badatya

No responses yet

Write a response