laravel-ide-helper icon indicating copy to clipboard operation
laravel-ide-helper copied to clipboard

There are no commands defined in the "ide-helper" namespace

Open bhojkamal opened this issue 2 years ago • 3 comments

Versions:

  • ide-helper Version: latest
  • Laravel Version: 9.52
  • PHP Version: 8.1.13

Question:

I removed the this package using composer remove barryvdh/laravel-ide-helper. I removed this from composer too.

"extra": {
  "laravel": {
    "dont-discover": [
      "barryvdh/laravel-ide-helper"
    ]
  }
}

I removed Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class, from config/app.php too.

I remove following from the AppServiceProvider too.

public function register()
{
    if ($this->app->isLocal()) {
        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
    }
    // ...
}

I removed _ide_helper.php and _ide_helper_models.php files too.
Still I got the error following error.

[2023-09-20 17:06:33] local.ERROR: There are no commands defined in the "ide-helper" namespace. {"exception":"[object] (Symfony\\Component\\Console\\Exception\\NamespaceNotFoundException(code: 0): There are no commands defined in the \"ide-helper\" namespace. at /home/kamal/lara-projects/chotkari-app/vendor/symfony/console/Application.php:657)

with more stacktrace lot of lines in couple seconds and my logs file is getting bigger bigger soon.

So What is missing to remove it, Please suggest me. Thanks.

bhojkamal avatar Sep 20 '23 11:09 bhojkamal

After doing everything like removing the vendor and composer update and all at last I went vs code setting. on laravel helper, I untick the Helper: Facades and Helper: models, now it stopped the producing that error on my log file. I spent 2 hours to figure it out.

bhojkamal avatar Sep 20 '23 12:09 bhojkamal

hi @bhojkamal i'm facing the same issue which vscode setting are you referring to?

UPDATE: the error was that I've forgot to put env on local

cirolosapio avatar Aug 12 '24 10:08 cirolosapio