I have found this module :


But this show errors in Frontend -

1 exception(s):
Exception #0 (ReflectionException): Class BitExpert\ForceCustomerLogin\Controller\LoginRouter does not exist

Exception #0 (ReflectionException): Class BitExpert\ForceCustomerLogin\Controller\LoginRouter does not exist
#0 C:\wamp64\www\sk\vendor\magento\framework\Code\Reader\ClassReader.php(19): ReflectionClass->__construct('BitExpert\\Force...')
#1 C:\wamp64\www\sk\vendor\magento\framework\ObjectManager\Definition\Runtime.php(44): Magento\Framework\Code\Reader\ClassReader->getConstructor('BitExpert\\Force...')
#2 C:\wamp64\www\sk\vendor\magento\framework\ObjectManager\Factory\Dynamic\Developer.php(48): Magento\Framework\ObjectManager\Definition\Runtime->getParameters('BitExpert\\Force...')
#3 C:\wamp64\www\sk\vendor\magento\framework\ObjectManager\ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('BitExpert\\Force...', Array)

Any options to force login in catlog and product page without module

  • try to run php bin/magento setup:upgrade && php -dmemory_limit=6G bin/magento setup:di:compile commands OR get the latest commit of this module OR try this one?
    – Hitesh
    Oct 23, 2018 at 6:49
  • please check file permission of file BitExpert/ForceCustomerLogin/Controller/LoginRoute.php Oct 23, 2018 at 6:49
  • Any options to Force login to catalog and product pages without module
    – Gagan
    Oct 23, 2018 at 7:01

2 Answers 2


try following:

php bin/magento setup:di:compile

It displayed there is syntax error and showed line number. Then updgrade

php bin/magento setup:upgrade

deploy like:

php bin/magento setup:static-content deploy

No in default you cant force login user


You can try to run below commands in order to make it working --

remove cache --

rm -rf var/cache/* generated/*

then use upgrade command -

php bin/magento setup:upgrade

then set permission of var and generated folder -

chmod -R 777 var/* generated/*

now check, if still issue occurs then you should try compile command --

php bin/magento setup:di:compile

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.