Heroku에서 Laravel 프로젝트를 실행 중입니다. 열의 유형을 변경하는 마이그레이션을 실행하려면 doctrine/dbal 패키지가 설치되어 있어야합니다. "require"
개체에 composer.json에 "doctrine/dbal": "^2.5"
줄을 넣었습니다.Doctrine/dbal이 Heroku에 설치되지 않음
변경 사항을 Heroku로 푸시하면 행이 표시됩니다.
- Installing doctrine/dbal (v2.5.5)
Downloading: 100%
바로 그 후 heroku run composer show doctrine/dbal
을 실행했습니다.
[InvalidArgumentException]
Package doctrine/dbal not found
나는 또한 그 후 몇 시간에 heroku run composer update
을 실행했다. 여기에 내 명령의 전체 기록이있다. 망할 놈의 repo에
C:\xampp\htdocs\jem\red-arrow (master) ([email protected])
λ heroku run composer update
Running composer update on red-arrow... up, run.9733 (Free)
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Removing symfony/polyfill-mbstring (v1.2.0)
- Installing symfony/polyfill-mbstring (v1.3.0)
Downloading: 100%
- Removing symfony/var-dumper (v3.1.4)
- Installing symfony/var-dumper (v3.1.8)
Downloading: 100%
- Removing symfony/translation (v3.1.4)
- Installing symfony/translation (v3.1.8)
Downloading: 100%
- Removing symfony/routing (v3.1.4)
- Installing symfony/routing (v3.1.8)
Downloading: 100%
- Removing symfony/process (v3.1.4)
- Installing symfony/process (v3.1.8)
Downloading: 100%
- Removing symfony/http-foundation (v3.1.4)
- Installing symfony/http-foundation (v3.1.8)
Downloading: 100%
- Removing symfony/event-dispatcher (v3.1.4)
- Installing symfony/event-dispatcher (v3.2.1)
Downloading: 100%
- Removing psr/log (1.0.0)
- Installing psr/log (1.0.2)
Downloading: 100%
- Removing symfony/debug (v3.1.4)
- Installing symfony/debug (v3.1.8)
Downloading: 100%
- Removing symfony/http-kernel (v3.1.4)
- Installing symfony/http-kernel (v3.1.8)
Downloading: 100%
- Removing symfony/finder (v3.1.4)
- Installing symfony/finder (v3.1.8)
Downloading: 100%
- Removing symfony/console (v3.1.4)
- Installing symfony/console (v3.1.8)
Downloading: 100%
- Removing swiftmailer/swiftmailer (v5.4.3)
- Installing swiftmailer/swiftmailer (v5.4.4)
Downloading: 100%
- Removing paragonie/random_compat (v2.0.2)
- Installing paragonie/random_compat (v2.0.4)
Downloading: 100%
- Removing ramsey/uuid (3.5.0)
- Installing ramsey/uuid (3.5.2)
Downloading: 100%
- Removing nikic/php-parser (v2.1.1)
- Installing nikic/php-parser (v3.0.2)
Downloading: 100%
- Removing psy/psysh (v0.7.2)
- Installing psy/psysh (v0.8.0)
Downloading: 100%
- Removing monolog/monolog (1.21.0)
- Installing monolog/monolog (1.22.0)
Downloading: 100%
- Removing league/flysystem (1.0.27)
- Installing league/flysystem (1.0.32)
Downloading: 100%
- Removing symfony/polyfill-util (v1.2.0)
- Installing symfony/polyfill-util (v1.3.0)
Downloading: 100%
- Removing symfony/polyfill-php56 (v1.2.0)
- Installing symfony/polyfill-php56 (v1.3.0)
Downloading: 100%
- Removing jeremeamia/superclosure (2.2.0)
- Installing jeremeamia/superclosure (2.3.0)
Downloading: 100%
- Removing classpreloader/classpreloader (3.0.0)
- Installing classpreloader/classpreloader (3.1.0)
Downloading: 100%
- Removing laravel/framework (v5.3.9)
- Installing laravel/framework (v5.3.28)
Downloading: 100%
- Installing doctrine/lexer (v1.0.1)
Downloading: 100%
- Installing doctrine/collections (v1.3.0)
Downloading: 100%
- Installing doctrine/cache (v1.6.1)
Downloading: 100%
- Installing doctrine/annotations (v1.3.0)
Downloading: 100%
- Installing doctrine/common (v2.6.2)
Downloading: 100%
- Installing doctrine/dbal (v2.5.5)
Downloading: 100%
- Installing fzaninotto/faker (v1.6.0)
Downloading: 100%
- Installing hamcrest/hamcrest-php (v1.2.2)
Downloading: 100%
- Installing mockery/mockery (0.9.6)
Downloading: 100%
- Installing symfony/yaml (v3.2.1)
Downloading: 100%
- Installing sebastian/version (2.0.1)
Downloading: 100%
- Installing sebastian/resource-operations (1.0.0)
Downloading: 100%
- Installing sebastian/recursion-context (2.0.0)
Downloading: 100%
- Installing sebastian/object-enumerator (2.0.0)
Downloading: 100%
- Installing sebastian/global-state (1.1.1)
Downloading: 100%
- Installing sebastian/exporter (2.0.0)
Downloading: 100%
- Installing sebastian/environment (2.0.0)
Downloading: 100%
- Installing sebastian/diff (1.4.1)
Downloading: 100%
- Installing sebastian/comparator (1.2.2)
Downloading: 100%
- Installing doctrine/instantiator (1.0.5)
Downloading: 100%
- Installing phpunit/php-text-template (1.2.1)
Downloading: 100%
- Installing phpunit/phpunit-mock-objects (3.4.3)
Downloading: 100%
- Installing phpunit/php-timer (1.0.8)
Downloading: 100%
- Installing phpunit/php-file-iterator (1.4.2)
Downloading: 100%
- Installing sebastian/code-unit-reverse-lookup (1.0.0)
Downloading: 100%
- Installing phpunit/php-token-stream (1.4.9)
Downloading: 100%
- Installing phpunit/php-code-coverage (4.0.3)
Downloading: 100%
- Installing webmozart/assert (1.2.0)
Downloading: 100%
- Installing phpdocumentor/reflection-common (1.0)
Downloading: 100%
- Installing phpdocumentor/type-resolver (0.2.1)
Downloading: 100%
- Installing phpdocumentor/reflection-docblock (3.1.1)
Downloading: 100%
- Installing phpspec/prophecy (v1.6.2)
Downloading: 100%
- Installing myclabs/deep-copy (1.5.5)
Downloading: 100%
- Installing phpunit/phpunit (5.7.4)
Downloading: 100%
- Installing symfony/css-selector (v3.1.8)
Downloading: 100%
- Installing symfony/dom-crawler (v3.1.8)
Downloading: 100%
sebastian/global-state suggests installing ext-uopz (*)
phpunit/phpunit-mock-objects suggests installing ext-soap (*)
phpunit/php-code-coverage suggests installing ext-xdebug (>=2.4.0)
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
phpunit/phpunit suggests installing ext-xdebug (*)
Writing lock file
Generating autoload files
> Illuminate\Foundation\ComposerScripts::postUpdate
> php artisan optimize
Generating optimized class loader
The compiled class file has been removed.
C:\xampp\htdocs\jem\red-arrow (master) ([email protected])
λ heroku run composer show doctrine/dbal
Running composer show doctrine/dbal on red-arrow... up, run.6084 (Free)
[InvalidArgumentException]
Package doctrine/dbal not found
show [--all] [-i|--installed] [-p|--platform] [-a|--available] [-s|--self] [-N|--name-only] [-P|--path] [-t|--tree] [-l|--latest] [-o|--outdated] [-D|--direct] [--] [<package>] [<version>]
링크 다음 Heroku가 응용 프로그램에 https://github.com/Jimut/red-arrow이
링크 : http://red-arrow.herokuapp.com/
Heroku에서 'composer update'를 실행하지 마십시오. 슬러그를 컴파일 한 후 로컬 파일 시스템을 변경하면 [Dyno주기가 끝나자 마자 사라질 것입니다] (https://devcenter.heroku.com/articles/dynos#ephemeral-filesystem). (당신의 서버에서'composer update'를 실행하는 것은 좋지 않습니다; 대신'composer install'을 사용하십시오.)'heroku run composer show'는 당신이 기대하는 출력을 생성합니까? 명령이 실행되는 위치에 따라 로컬'vendor /'디렉토리를 찾을 수 없을 수도 있습니다 (괜찮습니다). 중요한 것은 _ 코드 _가 라이브러리를 찾을 수 있다는 것입니다. – Chris
오! 알았다. 문제는 "doctrine/dbal"을 "require-dev"에서 "require"까지 "^ 2.5"'붙여 넣기 만하고 잠금 파일을 업데이트하지 않았기 때문에 문제가 발생했습니다. Heroku는'git push '후에'composer update' 대신'composer install'을 실행합니다. 그래서 패키지가 설치되지 않았습니다. 답변을 작성하거나 질문을 삭제해야합니까? – Jem
귀하에게 달려 있지만, [귀하의 질문에 대답 한 후 귀하의 답변을 수락하십시오] (https://stackoverflow.com/help/self-answer)를 고려해보십시오. 그렇게하면 다른 사용자가 찾은 혜택을 누릴 수 있습니다. – Chris