Documentation
Check Fireclass dependencies, configured files, exports, model paths, and TypeScript decorators.
doctor performs local, read-only health checks against the nearest configured
project.
fireclass doctorThe command has no command-specific options.
| Check | Failure level | What is verified |
|---|---|---|
fireclass.json | Fail | The file exists and can be parsed as JSON. |
| Runtime SDK | Fail | config.package is declared in dependencies or devDependencies. |
| Common dependencies | Fail | class-validator, class-transformer, and reflect-metadata are declared. |
| Framework dependencies | Fail | React has firebase; Express has firebase-admin; Next.js has firebase-admin and server-only. |
| Fireclass entry | Fail | The configured fireclass.path exists. |
| Firebase entry | Fail | The configured React/Express Firebase file exists. |
| Firebase export | Warn | A simple named variable/function/export matching firebase.export can be found. |
| Models directory | Warn | The configured models.dir exists. |
| TypeScript decorators | Fail or warn | Effective tsconfig targets enable both required decorator options. |
Next.js skips the Firebase file/export check because its configuration uses
firebase: null.
doctor follows root tsconfig references and checks configurations that
compile application source, including Vite's tsconfig.app.json.
Required options:
{
"compilerOptions": {
"experimentalDecorators": true,
"emitDecoratorMetadata": true
}
}A missing decorator flag is a failure. No tsconfig, or a configuration that cannot be safely interpreted, is reported as a warning requiring manual review.
The output uses:
| Symbol | Status | Exit effect |
|---|---|---|
✓ | Passed | None |
△ | Warning | Command still exits successfully |
✗ | Failed | Command exits with code 1 |
Any failed check produces a non-zero exit code, making doctor suitable for CI:
- name: Verify Fireclass
run: npx fireclass doctor| Result | Fix |
|---|---|
| SDK or dependency missing | Install the package named in the failed check. |
| Fireclass file missing | Restore it or update fireclass.path. |
| Firebase file missing | Restore it or update firebase.path. |
| Firebase export warning | Export the configured name directly or correct firebase.export. |
| Models directory warning | Create it or update models.dir. |
| Decorator options missing | Add both options to the effective app tsconfig. |
Use fireclass config to inspect paths before editing the
configuration.
doctor does not:
Run the framework build and an application-level Firebase smoke test in addition to doctor.