将Laravel App推送到heroku失败 - 有效的缓存路径错误

时间:2017-05-20 13:40:40

标签: php git laravel heroku laravel-5

我正在尝试将测试Laravel应用程序推送到Heroku,但每当我尝试这样做时,我都会收到错误并且部署停止。这是我部署时显示的内容:

remote:        Generating optimized autoload files
remote:        > Illuminate\Foundation\ComposerScripts::postInstall
remote:        > php artisan optimize
remote:        
remote:                                              
remote:          [InvalidArgumentException]          
remote:          Please provide a valid cache path.  
remote:                                              
remote:        
remote:        Script php artisan optimize handling the post-install-cmd event returned with error code 1
remote:  !     Push rejected, failed to compile PHP app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...

这里有什么问题? storage / framework文件夹包含所有需要的文件夹,它们包含在存储库中。那么这里有什么不对吗?

1 个答案:

答案 0 :(得分:0)

只要检查gitignore文件,如果有/storage/.key或/ storage / 删除它,再次运行commit和push。