PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, January 6, 2022

[FIXED] Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

 January 06, 2022     composer-php, laravel, laravel-5, laravel-5.6, php     No comments   

Issue

I am getting error while updating composer at laravel project. I'm using laravel 5.6.

While updating composer getting Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1. I tried so many solution but nothing happen, error exists still.

Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

   Illuminate\Database\QueryException  : SQLSTATE[42S02]: Base table or view not found: 1146 Table 'xyz.x' doesn't exist (SQL: select * from `x`)

  at /erp/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664
    660|         // If an exception occurs when attempting to run a query, we'll format the error
    661|         // message to include the bindings with SQL, which will make this exception a
    662|         // lot more helpful to the developer instead of just the database's errors.
    663|         catch (Exception $e) {
  > 664|             throw new QueryException(
    665|                 $query, $this->prepareBindings($bindings), $e
    666|             );
    667|         }
    668|

  Exception trace:

  1   App\Services\Listing\CompositionChecker::__construct()
      [internal]:0

  2   PDOException::("SQLSTATE[42S02]: Base table or view not found: 1146 Table 'xyz.x' doesn't exist")
      /erp/vendor/laravel/framework/src/Illuminate/Database/Connection.php:326

  Please use the argument -v to see more details.
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

How to solve this? Thanks in advance.


Solution

Removing all files from bootstrap/cache directory from root of Laravel app helped me to solve the problem.



Answered By - Ariful Haque
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing