# A generator failed

What "generator failed" means and how to fix it.

```text
error: generator lists failed: its script stopped with an error
hint: It printed:
file:///repo/tools/generators/lists/generator.ts:4
    throw new Error('no packages yet')
```

## Why it happens

A generator written in [TypeScript or JavaScript](https://axlers.dev/docs/crafting-your-repository/writing-generators.md#generators-in-typescript) didn't give Axle its files. The message says how:

- "couldn't start node": Node.js isn't installed or isn't on the `PATH`.
- "its script stopped with an error": it threw, its file has a syntax error, or it has no function as its default export, which the hint shows.
- "its script took longer than 30 seconds": it was stopped.
- "its script must return an object with each file's path and contents" or "its script returned something other than text": its default export returned something else, such as a list, or a file whose contents aren't a string.

## How to fix it

Fix the script using what it printed, then run `axle generate` again. A `generator.ts` needs Node.js 22.18 or later. For a generator a plugin ships, update the plugin or tell its authors. Nothing was written.
