In order to understand how subpackage works I have created a simple project.

So, if I set module name:

/* in insects/src/bee.d */
module insect.bee;

dmd complains about module bee

$ dub
src/app.d(1,8): Error: module bee is in file 'insects/bee.d' which cannot be read

If I remove module name

/* in insects/src/bee.d */

//module insect.bee;

and import just file name:

// in src/app.d 

//import insects.bee;
import bee;

void main() {

it works.

So, I cannot use module declaration in my subpackage?