Class not found error on creating a custom service inside a module I want to create a class with list of helper functions, so I created a module and placed the helper functions inside it. I created a service.yml inside that module folder.

services:
  helpers.helpers:
    class: Helpers


Helper class file:

class Helpers {
   public function buildPage($page_template, $template_variables) {
      echo "Dheivamey oru vazhiya"
   }
}


I make it as a dependency inside another module.

dependencies:
  - helpers:helpers


I tried using it inside a controller file like this

public function buildSomePage(Request $request) {
  $helper = \Drupal::service('helpers.helpers');
}


But I am getting a Helpers class not found error. Someone help me before my head explode.
This issue resolved after I included the full namespace from Drupal\module-name and placed the file inside the src folder. I included the namespace earlier, but I missed placing the corresponding "Helper" file in the src directory.