xxx2coder
@xxx2coder
веб-разработчик

Не могу установить пакет через composer?

Делаю вот так
composer require spatie/laravel-medialibrary
Выдаёт
Package operations: 1 install, 0 updates, 0 removals
  - Installing spatie/pdf-to-image (v2.x-dev 6718a89): Cloning 6718a89065
    Install of spatie/pdf-to-image failed

Installation failed, reverting ./composer.json and ./composer.lock to their original content.


  [RuntimeException]
  Failed to clone https://github.com/spatie/pdf-to-image.git, git was not found, check that it is installed and in your PATH env.

  'git' is not recognized as an internal or external command,

  operable program or batch file.

Не понимаю что делать. Решения не нашёл, были "решения", но не сработали, например:
composer install --prefer-dist

Мой файл composer.json
{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "require": {
        "php": "^7.3|^8.0",
        "ext-zip": "^1.15",
        "fideloper/proxy": "^4.4",
        "fruitcake/laravel-cors": "^2.0",
        "guzzlehttp/guzzle": "^7.0.1",
        "illuminate/bus": "^8.28",
        "laravel/framework": "^8.12",
        "laravel/tinker": "^2.5",
        "laravel/ui": "^3.2"
    },
    "require-dev": {
        "facade/ignition": "^2.5",
        "fakerphp/faker": "^1.9.1",
        "laravel/sail": "^1.0.1",
        "mockery/mockery": "^1.4.2",
        "nunomaduro/collision": "^5.0",
        "phpunit/phpunit": "^9.3.3"
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "autoload": {
        "psr-4": {
            "App\\": "app/",
            "Database\\Factories\\": "database/factories/",
            "Database\\Seeders\\": "database/seeders/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    }
}
  • Вопрос задан
  • 388 просмотров
Решения вопроса 1
Sanes
@Sanes
'git' is not recognized as an internal or external command,
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы