Skip to content
Advertisement

Heroku app: ModuleNotFoundError: No module named ‘pwa’

I am trying to deploy my app to heroku and I keep getting this error even though when I run locally it works perfectly fine. I have added django-pwa==1.0.10 to my requirments.txt file also so that heroku installs the package. Here are my installed apps in settings.py:

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'pwa',
    # 'embed_video',
    'whitenoise.runserver_nostatic',
    'courses.apps.CoursesConfig',
    'accounts.apps.AccountsConfig',
    'announcements.apps.AnnouncementsConfig',
    'students.apps.StudentsConfig',
    'home.apps.HomeConfig',
    'event_calendar.apps.EventCalendarConfig',
]

Here is my directory

Not really sure what to do as I am not very experienced with heroku.

Advertisement

Answer

By default Heroku will try to install every app from your requirements.txt, so before going any further make sure of the following:

  • You have run pip freeze > requirements.txtto reflect the change
  • Your path for the Procfile is correct

If it does not work after the troubleshooting, add your log from heroku to your first question, your procfile and requirements.txt.

Learning about procfile

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement