title: php artisan error after repo clone SQLSTATE[42S02]: Base table or view not found:
body: <p>I made a Laravel project with Jetstream and uploaded it to Github. After my colleague and I tried to execute <code>composer install</code>, we received the following error:</p>
  <pre><code>&gt; Illuminate\Foundation\ComposerScripts::postAutoloadDump
  &gt; @php artisan package:discover --ansi
  
     Illuminate\Database\QueryException 
  
    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'test.users' doesn't exist (SQL: select * from `users` limit 1)
  
    at vendor/laravel/framework/src/Illuminate/Database/Connection.php:742
      738▕         // If an exception occurs when attempting to run a query, we'll format the error
      739▕         // message to include the bindings with SQL, which will make this exception a
      740▕         // lot more helpful to the developer instead of just the database's errors.
      741▕         catch (Exception $e) {
    ➜ 742▕             throw new QueryException(
      743▕                 $query, $this-&gt;prepareBindings($bindings), $e
      744▕             );
      745▕         }
      746▕     }
  
    1   [internal]:0
        Illuminate\Foundation\Application::Illuminate\Foundation\{closure}(Object(App\Providers\RouteServiceProvider))
  
        +15 vendor frames 
    17  routes/web.php:20
        Illuminate\Database\Eloquent\Model::__callStatic(&quot;first&quot;, [])
  Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
  </code></pre>
  <p>We tried again without the scripts in <code>composer.json</code>, went well, but after each and every artisan-command we try, we get the following exception:</p>
  <pre><code>
  In Connection.php line 742:
                                                                                 
    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'test.users' doesn't exist (SQL: select * from `users` limit 1)                  
                                                                                 
  
  In Connection.php line 396:
                                                                                 
    SQLSTATE[42S02]: Base table or view not found: 1146 Table 'test.users' doesn't exist                                                       
  </code></pre>
  <p>This also happens when we try to execute <code>php artisan migrate</code>, the command which should solve this error.</p>
  <p>So, what can we try now?</p>