Error running Composer update while trying to install package scafold in Laravel 5.1

Asked

Viewed 1,872 times

2

I’m trying to install the package scafold in Laravel 5.1 only when I run Composer update it shows me an error.

C: xampp htdocs sites stock>Composer update Loading repositories with package information Updating dependencies (including require-dev)

[Errorexception] zlib_decode(): data error

update [-prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [-no-plu gins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-Progress] [-with-de pendencies] [-v|vv|vv|-verbose] [-o|-optimize-autoloader] [--ignore-Platform-reqs] [--p refer-stable] [-prefer-lowest] [packages1] ... [packagesN]

Then I ran the command Composer -vvv update:

Downloading http://packagist.org/p/laravel/framework$4721af190d059e42de5d516c963b992ca7e16 55071f2f84cfaf1fc7fcfa54b8e.json

[Errorexception] zlib_decode(): data error

Exception trace: () at phar://C:/Programdata/Composersetup/bin/Composer.phar/src/Composer/Util/Remotefi les ystem.php:218

I think it’s a mistake in the Laravel... I’ve already updated Poser, I’ve checked if Poser.phar is out of utf8 - good and also if PHP zlib is enabled.

Composer.json:

{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
    "php": ">=5.5.9",
    "laravel/framework": "5.1.*",
    "bestmomo/scafold": "0.0.1"
},
"require-dev": {
    "fzaninotto/faker": "~1.4",
    "mockery/mockery": "0.9.*",
    "phpunit/phpunit": "~4.0",
    "phpspec/phpspec": "~2.1"
},
"autoload": {
    "classmap": [
        "database"
    ],
    "psr-4": {
        "estoque\\": "app/"
    }
},
"autoload-dev": {
    "classmap": [
        "tests/TestCase.php"
    ]
},
"scripts": {
    "post-install-cmd": [
        "php artisan clear-compiled",
        "php artisan optimize"
    ],
    "pre-update-cmd": [
        "php artisan clear-compiled"
    ],
    "post-update-cmd": [
        "php artisan optimize"
    ],
    "post-root-package-install": [
        "php -r \"copy('.env.example', '.env');\""
    ],
    "post-create-project-cmd": [
        "php artisan key:generate"
    ]
},
"config": {
    "preferred-install": "dist"
}
}

3 answers

1

Try to change your composer.json in the following passage

"require": {
    "php": ">=5.5.9",
    "laravel/framework": "5.1.*",
    "bestmomo/scafold": "dev-master" // estava como 0.0.1
},

and then update

composer update

0


Seems to be a connection error.

Try removing the vendor folder and the Composer.lock file and then install again.

0

Try to clear the cache:

$ composer clearcache

Browser other questions tagged

You are not signed in. Login or sign up in order to post.