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

2
open
simplenotezy
simplenotezy
Posted 1 month ago

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

Versions:

  • ide-helper Version: 2.10
  • Lumen Version: 8
  • PHP Version: 7.4.22

Question:

I am getting this error:

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

I have tried following the installation guide here. https://github.com/barryvdh/laravel-ide-helper#adding-additional-facades

Also VSCode complains about this:

Undefined method 'userFromToken'.intelephense(1013)

image

But the code works just fine.

I am not sure what I am missing here

Similar issues: https://github.com/barryvdh/laravel-ide-helper/issues/829

mfn
mfn
lucassusanto
lucassusanto
Created 1 month ago

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

I also ran into this problem. I forgot to reset the APP_ENV variable in the .env file from production to local. I use the following code in AppServiceProvider.php instead of bootstrap/app.php as stated in here.

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