Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

環境構築にて、bdocker-compose のインストールやcoposer install周りのコマンドについてエラーが多数出たのでご教示いただきたいです!

環境構築にて、bdocker-compose のインストールやcoposer install周りのコマンドについてエラーが多数出たのでご教示いただきたいです!

以下のようなエラーが発生しております。
画像とコードを記載して起きますので、どなたかご教示いただければと思っておりますので
よろしくお願いいたします。

【ターミナル】(macos) php artisan serveコマンド:
https://gyazo.com/f10fba02565a39155c4590b6af955fd7

【ターミナル】(macos) composer install&updateコマンド:
https://gyazo.com/9728b9b3e2cd4cae1b146c022c6cf373

【ターミナル】(macOS) composer installコマンド:
https://gyazo.com/9012b65388621c8c265c359129f48e45

(base) nakamura@nakamuranoMBP meocloud % docker-compose --version
docker-compose version 1.27.4, build unknown
(base) nakamura@nakamuranoMBP meocloud % sudo chmod +x /usr/local/bin/docker-compose
(base) nakamura@nakamuranoMBP meocloud % docker-compose -v
docker-compose version 1.27.4, build unknown
(base) nakamura@nakamuranoMBP meocloud % docker-compose ps                          
    Name                  Command               State                    Ports                  
------------------------------------------------------------------------------------------------
app            docker-php-entrypoint /usr ...   Up      9000/tcp                                
db             docker-entrypoint.sh mysqld      Up      0.0.0.0:3306->3306/tcp                  
phpmyadmin     /docker-entrypoint.sh apac ...   Up      0.0.0.0:8080->80/tcp                    
redis-server   docker-entrypoint.sh redis ...   Up      0.0.0.0:6379->6379/tcp                  
webserver      /docker-entrypoint.sh ngin ...   Up      0.0.0.0:443->443/tcp, 0.0.0.0:80->80/tcp
(base) nakamura@nakamuranoMBP meocloud % docker-compose restart
Restarting phpmyadmin   ... done
Restarting webserver    ... done
Restarting app          ... done
Restarting redis-server ... done
Restarting db           ... done
(base) nakamura@nakamuranoMBP meocloud % composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update <package name>`.
Nothing to install or update
Package facebook/webdriver is abandoned, you should avoid using it. Use php-webdriver/webdriver instead.
Package fzaninotto/faker is abandoned, you should avoid using it. No replacement was suggested.
Package jakub-onderka/php-console-color is abandoned, you should avoid using it. Use php-parallel-lint/php-console-color instead.
Package jakub-onderka/php-console-highlighter is abandoned, you should avoid using it. Use php-parallel-lint/php-console-highlighter instead.
Package jeremeamia/SuperClosure is abandoned, you should avoid using it. Use opis/closure instead.
Package mtdowling/cron-expression is abandoned, you should avoid using it. Use dragonmantank/cron-expression instead.
Package phpoffice/phpexcel is abandoned, you should avoid using it. Use phpoffice/phpspreadsheet instead.
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover

Fatal error: Uncaught RuntimeException: A facade root has not been set. in /Users/nakamura/meocloud/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:218
Stack trace:
#0 /Users/nakamura/meocloud/app/Exceptions/Handler.php(38): Illuminate\Support\Facades\Facade::__callStatic('error', Array)
#1 /Users/nakamura/meocloud/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(352): App\Exceptions\Handler->report(Object(Symfony\Component\Debug\Exception\FatalThrowableError))
#2 /Users/nakamura/meocloud/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(131): Illuminate\Foundation\Console\Kernel->reportException(Object(Symfony\Component\Debug\Exception\FatalThrowableError))
#3 /Users/nakamura/meocloud/artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 {main}
  thrown in /Users/nakamura/meocloud/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 218
PHP Fatal error:  Uncaught RuntimeException: A facade root has not been set. in /Users/nakamura/meocloud/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:218
Stack trace:
#0 /Users/nakamura/meocloud/app/Exceptions/Handler.php(38): Illuminate\Support\Facades\Facade::__callStatic('error', Array)
#1 /Users/nakamura/meocloud/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(352): App\Exceptions\Handler->report(Object(Symfony\Component\Debug\Exception\FatalThrowableError))
#2 /Users/nakamura/meocloud/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(131): Illuminate\Foundation\Console\Kernel->reportException(Object(Symfony\Component\Debug\Exception\FatalThrowableError))
#3 /Users/nakamura/meocloud/artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 {main}
  thrown in /Users/nakamura/meocloud/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 218
Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255
(base) nakamura@nakamuranoMBP meocloud % composer self-update 1.9.3

You are already using composer version 1.9.3 (stable channel).
(base) nakamura@nakamuranoMBP meocloud % compoer install
zsh: command not found: compoer
(base) nakamura@nakamuranoMBP meocloud % composer install
Loading composer repositories with package information
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2.0 is now available and you should upgrade. See https://getcomposer.org/2
Updating dependencies (including require-dev)
PHP Fatal error:  Allowed memory size of 1610612736 bytes exhausted (tried to allocate 134217736 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleSet.php on line 83

Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 134217736 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleSet.php on line 83

Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.%                                                                     (base) nakamura@nakamuranoMBP meocloud % docker-composer self-update 1.9.3
zsh: command not found: docker-composer
(base) nakamura@nakamuranoMBP meocloud % composer self-update 1.9.3 
You are already using composer version 1.9.3 (stable channel).
(base) nakamura@nakamuranoMBP meocloud % composer install                 
Loading composer repositories with package information
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2.0 is now available and you should upgrade. See https://getcomposer.org/2
Updating dependencies (including require-dev)
PHP Fatal error:  Allowed memory size of 1610612736 bytes exhausted (tried to allocate 134217736 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleSet.php on line 83

Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 134217736 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleSet.php on line 83

Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.% 

ご教示の程、よろしくお願いいたします

0

1Answer

Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run composer update or composer update <package name>.

となっているにもかかわらず、次の行で

Nothing to install or update

となっているため、依存関係を正しく解決できてないとか。
package.jsonを確認してみる。
パッケージ構成に問題なければ、バージョンx.y.zzまで固定してみるとか

また、

Allowed memory size of 1610612736 bytes exhausted

とも出力されているため、phpへの割り当てメモリが足りていないとか
php.iniのメモリ割り当てが適切かどうか確認してみる。

0Like

Your answer might help someone💌