Skip to content

A project breaks a boundary rule

error: apps/web/src/admin.ts:3 imports admin, but projects tagged type:app may only depend on type:lib or type:util
hint: Move what web needs from admin into a project tagged type:lib or type:util, or change the rule in axle.toml.

axle boundaries found a dependency that one of the [[boundaries.rules]] in axle.toml doesn’t allow. The message says where the dependency comes from: a line of a package.json, implicitDependencies in an axle.toml, an import in a file, or a plugin. It ends with the rule, from allow (“may only depend on”) or deny (“may not depend on”). With allow = [] it says “may not depend on another project”, and a rule on * says “every project” or “no project”.

  • Move the code both projects need into a project the rule allows, such as a library, and depend on that.
  • Or remove the dependency, if it isn’t needed any more. A rule from deny or allow = [] suggests that:
hint: Remove the dependency of web on admin, or change the rule in axle.toml.
  • Or, if the dependency is right and the rule is too strict, change the rule, or the project’s tags.