无法在heroku上安装我的laravel应用程序

时间:2016-03-10 21:00:02

标签: php git laravel heroku laravel-5.2

无论我尝试什么,我总是会收到此错误: stackoverflow要求我在这个问题上添加更多细节,它赢得了#39;发布。我已经尝试将.env和/ vendor放在.gitignore中,我已经尝试过设置buildpacks,我在搜索部署laravel项目到heroku时尝试了很多在互联网上看到的东西

无效。

这是我的git push heroku master命令的输出,无法编译的PHP错误位于底部:

git push heroku master
Counting objects: 4, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 293 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Using set buildpack heroku/php
remote: -----> PHP app detected
remote: -----> Bootstrapping...
remote: -----> Installing platform packages...
remote:        - php (7.0.4)
remote:        - ext-mbstring (bundled with php)
remote:        - apache (2.4.18)
remote:        - nginx (1.8.1)
remote: -----> Installing dependencies...
remote:        Composer version 1.0.0-beta1 2016-03-03 15:15:10
remote: 
remote:  !     WARNING: Your Composer vendor dir is part of your Git repository.
remote:        This directory should not be under version control; only your
remote:        'composer.json' and 'composer.lock' files should be added, which
remote:        will let Composer handle installation of dependencies on deploy.
remote:        To suppress this notice, first remove the folder from your index
remote:        by running 'git rm --cached vendor/'.
remote:        Next, edit your project's '.gitignore' file and add the folder
remote:        '/vendor/' to the list.
remote:        For more info, refer to the Composer FAQ: http://bit.ly/1rlCSZU
remote: 
remote:        Loading composer repositories with package information
remote:        Installing dependencies from lock file
remote:          - Removing symfony/dom-crawler (v3.0.3)
remote:          - Removing symfony/css-selector (v3.0.3)
remote:          - Removing phpunit/phpunit (4.8.23)
remote:          - Removing phpunit/php-code-coverage (2.2.4)
remote:          - Removing phpunit/php-file-iterator (1.4.1)
remote:          - Removing phpunit/php-token-stream (1.4.8)
remote:          - Removing phpunit/php-timer (1.0.7)
remote:          - Removing phpunit/phpunit-mock-objects (2.3.8)
remote:          - Removing phpunit/php-text-template (1.2.1)
remote:          - Removing phpspec/prophecy (v1.6.0)
remote:          - Removing phpdocumentor/reflection-docblock (2.0.4)
remote:          - Removing doctrine/instantiator (1.0.5)
remote:          - Removing symfony/yaml (v3.0.3)
remote:          - Removing sebastian/comparator (1.2.0)
remote:          - Removing sebastian/diff (1.4.1)
remote:          - Removing sebastian/environment (1.3.5)
remote:          - Removing sebastian/exporter (1.2.1)
remote:          - Removing sebastian/recursion-context (1.0.2)
remote:          - Removing sebastian/global-state (1.1.1)
remote:          - Removing sebastian/version (1.0.6)
remote:          - Removing mockery/mockery (0.9.4)
remote:          - Removing hamcrest/hamcrest-php (v1.2.2)
remote:          - Removing fzaninotto/faker (v1.5.0)
remote:        Generating optimized autoload files
remote:        > php artisan clear-compiled
remote:        
remote:                                   
remote:          [ErrorException]         
remote:          Undefined variable: app  
remote:                                   
remote:        
remote:        Script php artisan clear-compiled handling the post-install-cmd event returned with an error
remote:        
remote:                              
remote:          [RuntimeException]  
remote:          Error Output:       
remote:                              
remote:        
remote:        install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] [<packages>]...
remote:        
remote: 
remote:  !     Push rejected, failed to compile PHP app
remote: 
remote: Verifying deploy...
remote: 
remote: !   Push rejected to enigmatic-mesa-86827.
remote: 
To https://git.heroku.com/enigmatic-mesa-86827.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/enigmatic-mesa-86827.git'

1 个答案:

答案 0 :(得分:-1)

控制'composer.json'和'composer.lock'文件