Trying to push my app to heroku gives me this error FileNotFoundError: [Errno 2] No such file or directory: '/app/gettingstarted/media'

后端 未结 1 1433
栀梦
栀梦 2021-01-02 13:38

While trying to push my app I get the follwing error

FileNotFoundError: [Errno 2] No such file or directory: \'/app/gettingstarted/media\'

相关标签:
1条回答
  • 2021-01-02 14:05

    I think the issue here is that git doesn't track empty directories, they need to contain at least one file for git to "see" them, so although your media directory exists locally it doesn't exist on Heroku. A common way of handling this is to create an empty file called .keep in the directory.

    0 讨论(0)
提交回复
热议问题