5

There are no commands defined in the "setup:static-content" namespace.

Did you mean one of these?

  setup
  setup:config
  setup:cron
  setup:db-data
  setup:db-schema
  setup:db
  setup:di
  setup:performance
  setup:store-config

When Run deploy Command in Magento 2 show error in console?

  • Please don't just dump error messages in the question form. You should at least explain when it happens and if you did any changes before. Otherwise you will get mostly random useless answers. – Fabian Schmengler Dec 20 '16 at 7:44
  • if you have space at start code than remove it and than execute commad – Waseem Nov 21 at 12:53
9

first run the cmd composer install in you folder then run this cmd

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy (or) 
php bin/magento setup:static-content:deploy -f
php bin/magento indexer:reindex
php bin/magento cache:flush (or)
php -f bin/magento cache:clean

after setup:upgrade you remove the generation, page_cache, cache, view_preprocessed, static rm -rf var/generation/*

  • Source error, I setup again then deploy ok. Thanks you. – TUYEN TRAN THANH Dec 29 '16 at 3:40
3

You have to call below command in your cmd,

php bin/magento setup:static-content:deploy

After run above command no error are display.

Remove var folder and clear cache.

1

You may also need to file permission if you run through Linux based system. i have same issue and resolved by setting up file permission properly. http://devdocs.magento.com/guides/v2.0/install-gde/prereq/file-system-perms.html

0

This is perfect working example ,

Just execute the below command from the SSH,

find . -type d -exec chmod 755 {} \; && find . -type f -exec chmod 644 {} \; && chmod u+x bin/magento

0

Use below command

php bin/magento setup:static-content:deploy

php bin/magento cache:flush

chomd -R 777 var/ pub/ generated/

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.