Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
simplenotezy opened this issue Aug 29, 2021 · 6 comments
Closed

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

simplenotezy opened this issue Aug 29, 2021 · 6 comments

Comments

@simplenotezy
Copy link

simplenotezy commented Aug 29, 2021

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:
#829

@mfn
Copy link
Collaborator

mfn commented Aug 30, 2021

Does the information in #438 help?

@lucassusanto
Copy link

lucassusanto commented Sep 6, 2021

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);
    }
}

@stale
Copy link

stale bot commented Jan 3, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If this issue is still present on the latest version of this library on supported Laravel versions, please let us know by replying to this issue so we can investigate further.
Thank you for your contribution! Apologies for any delayed response on our side.

@stale stale bot added the stale label Jan 3, 2022
@stale stale bot closed this as completed Apr 16, 2022
@mhmmdtech
Copy link

I faced this error in the deployment process of my project.
My post-autoload-dump is like this:

"post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan ide-helper:generate",
            "@php artisan ide-helper:models --nowrite",
            "@php artisan package:discover --ansi"
        ],

As soon as I run the composer install --optimize-autoloader --no-dev in production, I faced this error.

@spacemudd
Copy link

@mhmmdtech Use "dev-post-update-cmd" like this:

        "post-update-cmd": [
            "Illuminate\\Foundation\\ComposerScripts::postUpdate"
        ],
        "dev-post-update-cmd": [
            "@php artisan ide-helper:generate",
            "@php artisan ide-helper:meta"
        ]

@pishguy
Copy link

pishguy commented Dec 19, 2023

Did you added this line to app/config?

Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants