2

PHP Fatal error: Class 'Cli' not found in /home/xxx-xxx/public_html/bin/magento on line 31

xxx-xxx@rck:~/public_html$ php bin/magento

No lock file found. Unable to read locked packages#0

/home/xxx/public_html/vendor/composer/composer/src/Composer/Package/Locker.php(146): Composer\Package\Locker->getLockData()

Magento\Framework\Console\Cli->__construct('Magento CLI')

I am trying following commands:

php bin/magento

php bin/magento setup:upgrade
  • specify complete command which you try to run from Command line. – Dhiren Vasoya Oct 6 '17 at 6:38
  • I have updated the question, Kindly read again. Thanks! – Irfan Momin Oct 6 '17 at 6:41
  • just try only this command "php bin/magento setup:upgrade" – Dhiren Vasoya Oct 6 '17 at 6:46
  • Already tried, No Luck – Irfan Momin Oct 6 '17 at 6:47
4

You are missing the composer.lock file and you must run the commands:

composer update

After you ran the above command, you can run the command:

php bin/magento setup:upgrade
  • There was missing composer.lock and composer.phar file! I have uploaded both and DONE!! – Irfan Momin Oct 6 '17 at 9:13
  • Your welcome. :) – St3phan Oct 6 '17 at 16:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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