# dev command loops

`TNL_DEV_COMMAND_RECURSION`

the configured development command led back to tnl dev, so the local service never started.

the development command loops before starting the local service

```text
+--[ where it stopped ]----------------------------------------+
|                                                              |
|  tnl dev                                                     |
|     |                                                        |
|     v                                                        |
|  configured dev.command                                      |
|     |                                                        |
|     x  starts tnl dev again                                  |
|  local service (not started)                                 |
|                                                              |
+--------------------------------------------------------------+
```

## what happened

- `dev.command` calls `tnl dev` directly
- `dev.command` runs the package.json `dev` script, and that script starts `tnl dev`

## if you run tnl

- set `dev.command` to the app command, such as `["next", "dev"]` for Next.js or `["vite"]` for Vite
- for another app, run its binary directly or use a separate script such as `dev:app`; `scripts.dev` may then run `tnl dev`
- run `tnl init` to review the project setup, then start your app again

help: https://tnl.dev/e/dev-command-recursion
