我正在尝试将测试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文件夹包含所有需要的文件夹,它们包含在存储库中。那么这里有什么不对吗?
答案 0 :(得分:0)
只要检查gitignore文件,如果有/storage/.key或/ storage / 删除它,再次运行commit和push。