I have create a module and its working fine when compilation is disabled. Its getting below error when after compilation run.

> 
> PHP Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Customer\Model\Customer::\_\_construct() must be an instance of Magento\Framework\Model\Context, instance of Magento\Framework\ObjectManager\ObjectManager given,
> 
> 
> 

```
<?php

namespace Supravat\Customer\Helper;

class Customer extends \Magento\Framework\App\Helper\AbstractHelper
{
    protected $customerRepositoryInterface;

    public function __construct(
        \Magento\Framework\App\Helper\Context $context,
        \Magento\Customer\Api\CustomerRepositoryInterface $customerRepositoryInterface
    ) 
    {
        ...........
        parent::__construct($context);
        $this->customerRepositoryInterface = $customerRepositoryInterface;
    }

    public function getCustomerById() {
        $customer_id  = 1; // 1 is the magento customer id
        $customer = $this->customerRepositoryInterface->getById($customer_id);
        var_dump($customer->getData());
    }
}

```

**Note: Compilation is generates code and dependency injection configuration successfully.**