While setting up some cluster machines to run masterless I ran into this bug. I had a directory structure like this:
code module1 manifests module2 modules module3 manifests
When running puppet apply with the modulepath code:code/module1/modules I ran into this error, specifically using the logrotate module.
Error: Evaluation Error: Resource type not found Logrotate::Size (file: code/modules/logrotate/manifests/conf.pp, line: 32, column:12)
But Logrotate::Size is defined in code/module2/modules/logrotate/types/size.pp which is accessible. I had to turn on some extra debugging to figure out that the autoloader didn't like that two related directories were in the modulepath and there were two ways to reach the definition from the modulepath. I had to rework my directories like this to get it to work.
code modules module1 control module2 modules module3 manifests
After making the change, the autoloader was able to uniquely identify the datatype definition.
Bit of a weird problem that I definitely created for myself by nesting my modulepath like that.