2
votes

When trying to install composer in laravel project get this error.

Illuminate\Foundation\ComposerScripts::postAutoloadDump @php artisan package:discover In ProviderRepository.php line 208:

Class 'NunoMaduro\Collision\Adapters\Laravel\CollisionServiceProvider' not
found
Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1

6
sir, I have read problem solution that not working for me. That's why i am asked the question here - Shubhra Sarker
"extra": { "laravel": { "dont-discover": [ "laravel/dusk" ] } }, try this in composer.json I solved the problem this way: cd bootstrap/cache/ rm -rf *.php took those two answer from stackoverflow. - Shubhra Sarker
Sir, if it is too easy, then help me, that is save my day - Shubhra Sarker
those two not working for me - Shubhra Sarker
After update composer.json, run composer update locally then deploy on gcp again. - Fábio Nicolau de Lima

6 Answers

5
votes

I had this issue when deploying my app to Google App Engine. I found that by moving "nunomaduro/collision": "^2.0" from "require-dev" to "require" in my composer.json fixed this problem.

1
votes

If your project is not running on production, set the APP_ENV to dev or something different than production. The migration and seeds should work.

0
votes

Inside of your composer.lock ,

Move "nunomaduro/larastan": "^0.3.0", to "require" from "require-dev" .

then run composer install

this worked for me

0
votes

in php v-8 i get this error " Call to undefined method Dotenv\Repository\RepositoryBuilder::create()" and then in terminall type this "composer outdated" and then i know i should update nunomaduro/collision then in terminal "composer require nunomaduro/collision"

0
votes

I am using 5.6 version with php version 7.2

Tried these page solutions

but following worked for me

in terminal

  1. composer outdated
  2. composer require nunomaduro/collision:^3.0 --dev

Note: I have no Idea if the first step is must but I wrote that command in terminal, Try using 2nd only, if it works then suggest me to edit please.

Thank you.

I found this solution from Git Hub page Github

-2
votes

I have answer in folder boostrap/cache/packages.php , we will succes .So delete package is error.

Class 'NunoMaduro\Collision\Adapters\Laravel\CollisionServiceProvider' not found

Deleting...

So you PHP artisan serve.