knuckleswtf / knuckleswtf/scribe

Artisan error: A facade root has not been set

Open
#1,004 8 comments 0 reactions 0 assignees View on GitHub
bug triage
Dominant language
PHP
Stars
2.3k
Forks
357
PR merge metrics
No merged PRs in 30d

Description

### Scribe version

5.2.1

### PHP version

8.4.8

### Laravel version

12.13.0

### Scribe config

```ruby
type => "external_laravel"
theme => "scalar"
laravel.docs_url => "/api/documentation"
```

### What happened?

I used scribe on my local project (Windows) and it works well. But when I push it on my server (Ubuntu 24) it prevent to run any composer or artisan command and every time I will give below error:

```
@php artisan package:discover --ansi
PHP Fatal error: Uncaught RuntimeException: A facade root has not been set. in /vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:358
```

Consider I can't stop the error until I remoove the /config/scribe.php.

### Docs

- [x] I've checked [the docs](https://scribe.knuckles.wtf/laravel), the [troubleshooting guide](https://scribe.knuckles.wtf/laravel/troubleshooting), and [existing issues](https://github.com/knuckleswtf/scribe/issues?q=is%3Aissue+), but I didn't find a solution

Contributor guide

Open the contributing guide

Research direction

Start with config/scribe.php and reproduce the failure during `composer` or `artisan package:discover` on the reported Ubuntu 24 environment, comparing it with the working Windows setup. Trace where Scribe configuration is loaded relative to Laravel facade initialization, and confirm that removing config/scribe.php is no longer required for Composer and Artisan commands to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
laravel, php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.