# SH1004: The game doesn't depend on the engine through the shuyi crate

Source: https://zafnok.github.io/shuyi-engine/learn/errors/sh1004/

Class: setup, exit code 3.

`modules` and `add` read the catalog of the engine the game builds with,
and turn modules on as features of its `shuyi` crate. The game's
`Cargo.toml` has no `shuyi` dependency (under `[workspace.dependencies]`
or `[dependencies]`), or the engine it names can't be read: a folder
that isn't there, or a git dependency cargo can't resolve.

**How to fix it.** Depend on the engine through `shuyi`, as a game made
by `shuyi new` does:

```toml
[workspace.dependencies]
shuyi = { git = "https://github.com/Zafnok/shuyi-engine", rev = "<commit>" }
```

Check that the engine it names is there (`cargo metadata` resolves it),
then run the same command again.

For example:

```text
modules: error[SH1004]: the game's Cargo.toml has no `shuyi` dependency (under [workspace.dependencies] or [dependencies]): a game turns modules on through the engine's `shuyi` crate
```
