Laravel Telescope won't remove

Viewed 8876

After running composer remove laravel/telescope It still won't remove telescope completely. I've followed the answer here https://github.com/laravel/telescope/issues/361 but to no avail it still doesn't work. Here's the error message

enter image description here

3 Answers

You must first remove all the telescope reference in your code before running composer remove laravel/telescope.

  1. Kindly check config/app.php, under providers array, remove the Telescope there
  2. In your app/Providers/AppServiceProvider.php is there a TelescopeServiceProvider there? Remove that also.
  3. Remove telescope.php in config folder

Then finally you can run composer remove laravel/telescope.

This is what worked for me:

Inside:

 root->config->telescope.php

in the telescope.php config file:

'enabled' => env('TELESCOPE_ENABLED', 'true'),

I changed the true to false.

If you want to just disable Telescope temporarily, in your composer.json file add laravel/telescope to the dont-discover index:

"laravel": {
        "dont-discover": ["laravel/telescope"]
}

then run the composer dump command.

To permanently remove the telescope, run the composer remove laravel/telescope command, then remove App\Providers\TelescopeServiceProvider::class, from config/app.php file and delete TelescopeServiceProvider file from app/providers/ folder.

Related