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

后端 未结 14 2169
孤街浪徒
孤街浪徒 2020-12-03 05:09

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

14条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-03 05:53

    I solved the problem this way:

    cd bootstrap/cache/
    rm -rf *.php
    

    The bootstrap directory contains the app.php file that initializes the structure. This directory also houses a cache directory that contains structure-generated files for performance optimization, such as files and route cache services. Laravel stores configuration files, provider, and cached services to optimize the fetching of this information. The problem with me was when the other developer ran the 'php artisan config: cache' command on your machine and since the cache folder contains files that can be deleted, I deleted them and solved the problem.

提交回复
热议问题