Script @php artisan package:discover handling the

2019-02-18 05:25发布

I moved my project from desk to another.
When I run php artisan it does not work.

I tried to run composer update, but it returns the error

Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255

3条回答
冷血范
2楼-- · 2019-02-18 05:46

Do you have .env file in your new project?

I had same error message. When I add .env file, error is gone.

success message like this.

Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover
Discovered Package: fideloper/proxy
Discovered Package: ixudra/curl
Discovered Package: laravel/tinker
Discovered Package: nesbot/carbon
Discovered Package: socialiteproviders/manager
Package manifest generated successfully.

I hope this will help you.

查看更多
祖国的老花朵
3楼-- · 2019-02-18 05:54

maybe you have an error in the project code (for example, in routes or controller). This may be one of the reasons for this error.

In my project, the web.php file has a syntax error. I defined this when I started the php artisan command

C:\OSPanel\domains\lara.shop.loc>php artisan
In web.php line 
  syntax error, unexpected end of file  
查看更多
Explosion°爆炸
4楼-- · 2019-02-18 05:55

I solved the problem this way:

cd bootstrap/cache/
rm -rf *.php
查看更多
登录 后发表回答