skip to Main Content
  • I am copying a current site (working) to new site for demo.
  • After running “composer install” and setup permission, I run:
    php bin/magento setup:static-content:deploy
  • This error is shown:

    [BadMethodCallException] Missing required argument $sources of MagentoDeploySourceSourcePool.

Anyone know what is problem? Please help. Many thanks!

3

Answers


  1. In Magento 2 first you need to compile the app so it generates core classes.
    You need to run

    php bin/magento setup:di:compile

    before running

    php bin/magento setup:static-content:deploy

    Also when running setup:static-content:deploy make sure that your magento setup is in developer mode.

    Login or Signup to reply.
  2. enter image description hereHey I got the same error

    I tried running

    php bin/magento setup:di:compile

    it given error as

    You cannot run this command because modules are not enabled. You can enable modules by running the 'module:enable --all' command.
    

    run

    php bin/magento module:enable –all

    sudo rm -rf var/cache/* generated/code/*

    php bin/magento setup:upgrade

    php bin/magento setup:static-content:deploy -f

    sudo chmod 777 -R {app,pub,generated,var}

    Login or Signup to reply.
  3. Change operation mode to developer mode

    php bin/magento deploy:mode:set developer
    

    Then run below commands:

    php bin/magento setup:upgrade
    php bin/magento setup:di:compile
    php bin/magento setup:static-content:deploy -f
    php bin/magento indexer:reindex
    php bin/magento cache:flush
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search