Skip to content
Meeko
Type to search the guides and the API reference. Open it from any page with / or Ctrl K; move with the arrow keys and open a result with Enter.
Get started

Contents

On this page

meeko check-app

Checks all .meeko components in the application and its layers, without generating .meeko/ or checking .ts files with TypeScript.

command Since 1.0.0

meeko check-app scans the .meeko files in app/, server/ and shared/ in the project and its layers and checks each one like meeko check <componente>: syntax, directives, types and placement of <script server> blocks. It also warns about misplaced +group.ts files and imports using aliases from an inappropriate scope (#server/ in app/ or shared/, @/ in shared/).

It is the first half of meeko check: it does not generate .meeko/, read .env or run TypeScript on .ts files in server/, shared/ and app/. Use meeko check for CI; check-app checks only components.

Usage#

sh
meeko check-app .
texto
.: OK

The OK line repeats the directory as written, not its absolute path.

Type#

sh
meeko check-app <directorio>

Parameters#

Parameter Type Default Description
<directorio> path required Project root. Without it, Falta el directorio de check-app.

Result#

Case Output Code
No errors Warnings on stderr and <directorio>: OK on stdout 0
Errors All diagnostics (errors and warnings) on stderr, one per line 1
Directory does not exist (since 1.7) No existe el directorio <directorio> on stderr 1
texto
C:\proyectos\tienda\app\components\Greeting.meeko:3:7 TS2322: Type 'string' is not assignable to type 'number'.
C:\proyectos\tienda\app\components\Greeting.meeko:3:23 aviso MEEK101: props.name se lee una sola vez porque el setup se ejecuta una sola vez: …

meeko check does the same in its first step and, if there are errors, stops there with the same diagnostics before running TypeScript on the projects.

Examples#

Only components, in a hook#

sh
meeko check-app . || exit 1

Components in a layer#

ts
// meeko.config.ts
import { defineMeekoConfig } from "@meekojs/meeko/framework";

export default defineMeekoConfig({ layers: ["./layers/base"] });
sh
meeko check-app .

It also checks layers/base/app/**/*.meeko, with the auto-imports and aliases available to them in the project.

Common mistakes#

Treating it as the complete check#

Incorrectsh
meeko check-app .

With a type error in server/api/health.get.ts, check-app prints .: OK and exits with 0: it does not run TypeScript on .ts files.

Correctsh
meeko check .

A directory that does not exist#

Incorrectsh
meeko check-app ./tiend

No existe el directorio ./tiend (C:\proyectos\tiend) on stderr and code 1, without OK. Through 1.6, it printed ./tiend: OK and exited with 0, because it did not distinguish a missing folder from a project without errors.

Correctsh
meeko check-app ./tienda

Omitting the directory#

Incorrectsh
meeko check-app

Falta el directorio de check-app, with usage and code 1.

Correctsh
meeko check-app .

Notes#

  • Performance. Each component is checked with its own tsc process, sequentially: in an application with many components, it takes longer than the editor, which only checks open ones.
  • Generated types. It does not regenerate .meeko/types/ (routes, contracts, auto-imports): it uses existing files. After creating a page or endpoint, run meeko routes or meeko check first.
  • No .env. It does not read it or execute the server runtime.
  • Windows and POSIX. Diagnostic paths use the system separator.

Was this page helpful?

Add a comment

It is sent when you choose “Yes” or “No”. Only the page, your answer and the comment are stored: no cookies and no personal data.

0 of 2000 characters

Edit on GitHub: docs/en/reference/commands/meeko-check-app.md