barryvdh / laravel-ide-helper

IDE Helper for Laravel
MIT License
14.25k stars 1.17k forks source link

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

Open bhojkamal opened 1 year ago

bhojkamal commented 1 year ago

Versions:

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 commented 1 year ago

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.

cirolosapio commented 3 months ago

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

ataldev commented 1 month ago

I fixe this by stopping the Laravel Helper extension on vs Code.