The error you are getting because you are overriding Account/LoginPost controller but not using its default repositories, Update your `__construct` function like, public function __construct( Context $context, Session $customerSession, AccountManagementInterface $customerAccountManagement, CustomerUrl $customerHelperData, Validator $formKeyValidator, AccountRedirect $accountRedirect, \Magento\Wishlist\Model\WishlistFactory $wishlistRepository, \Magento\Catalog\Api\ProductRepositoryInterface $productRepository ) { $this->session = $customerSession; $this->customerAccountManagement = $customerAccountManagement; $this->customerUrl = $customerHelperData; $this->formKeyValidator = $formKeyValidator; $this->accountRedirect = $accountRedirect; $this->_wishlistRepository= $wishlistRepository; $this->_productRepository = $productRepository; parent::__construct($context,$customerSession,$customerAccountManagement,$customerHelperData,$formKeyValidator,$accountRedirect); } Remove `var/generation` and check.