init has not run in this checkout
CommonA fresh clone, a CI job, or a different working directory, where .terraform does not exist.
Confirm
ls .terraform/modules/modules.json
No such file
Fix
- Run terraform init in the same directory before validate or plan.
- In a CI job that only validates: terraform init -backend=false, then terraform validate.
terraform init -backend=false -input=false terraform validate
Reproduced on Terraform 1.14.0: installed the module and validated.