How best to use a custom module?

The use of multiple includes is what’s causing the problem.

You could try this where they are all in the same source file

Or add moduleA to the Manifest of moduleB using Pkg.add(path=“/path/to/A”), create a project in a separate directory to include moduleA and moduleB as dependencies.