tu6ge / voyager-excel

voyager excel export --一个Voyager的Excel导出插件
MIT License
21 stars 11 forks source link

Voyager Excel Don't Install Anyway #5

Closed loooping-old closed 4 years ago

loooping-old commented 4 years ago

I'm open an issue in Larapack Hooks, see #48

loooping-old commented 4 years ago

Any idea? Really can’t install anyway

tu6ge commented 4 years ago

open composer.json, find this

{
    "repositories": {
        "hooks": {
            "type": "composer",
            "url": "https://larapack.io"
        }
    }
}

update this

{
    "repositories": {
        "hooks": {
            "type": "composer",
            "url": "http://satisfy.xiaoqiezi.top"
        }
    }
}

next,update composer.json

{
    "config": {
        ...
        "secure-http": false
    },
    ...
}

open App\Providers\AppServiceProvider.php ,in register method add this code:

use Larapack\Hooks\Hooks;

$this->app->resolving(Hooks::class, function ($api, $app) {
    $this->app[Hooks::class]::setRemote('http://satisfy.xiaoqiezi.top');
    $this->app[Hooks::class]->readJsonFile();
});

then ,run php artisan hook:install voyager-excel

loooping-old commented 4 years ago

I do this, and same error:

Also run composer update for update composer.lock and the call use Larapack\Hooks\Hooks; I do outside of the method for work correctly.

bash-5.0# php artisan hook:install voyager-excel

   ErrorException  : Undefined index: voyager-excel

  at /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Collection.php:1290
    1286|      * @return mixed
    1287|      */
    1288|     public function offsetGet($key)
    1289|     {
  > 1290|         return $this->items[$key];
    1291|     }
    1292| 
    1293|     /**
    1294|      * Set the item at a given offset.

  Exception trace:

  1   Illuminate\Foundation\Bootstrap\HandleExceptions::handleError("Undefined index: voyager-excel", "/var/www/html/vendor/laravel/framework/src/Illuminate/Support/Collection.php", ["voyager-excel"])
      /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Collection.php:1290

  2   Illuminate\Support\Collection::offsetGet("voyager-excel")
      /var/www/html/vendor/larapack/hooks/src/Hooks.php:237

  Please use the argument -v to see more details.
loooping-old commented 4 years ago

Really I Can't install voyager-excel other Hooks of larapack.io works fine but voyager-excel won't work anyway I tried a lot solutions but all fails

loooping-old commented 4 years ago

Hi I Solve installing again ZIP ext in php

Suggestion: add ZIP dependencie in yout composer.json

RUN apk add --no-cache zip libzip-dev
RUN docker-php-ext-configure zip --with-libzip
RUN docker-php-ext-install zip
tu6ge commented 4 years ago

larapack/hooks install hook and dependent by Memory,this hook dependent maatwebsite/excel, then install hook by more memory and cpu. sorry

loooping-old commented 4 years ago

Got it but I believe is not my problem my machine have 8gb ram an i7 processor, but cool thanks

tu6ge commented 4 years ago

Can you install maatwebsite/excel package in any path?

loooping-old commented 4 years ago

Yeah works fine.

tu6ge commented 4 years ago

You can try install maatwebsite/excel , After install this hook

tu6ge commented 4 years ago

Sorry, My computer have composer cache. now,I find http://satisfy.xiaoqiezi.top/ secret is wrong ,then I repair it,can you try again?