0

I am supposed to rework a front end design of an existing Magento2 website, I already have a local installation of Magento2 on MAMP with composer. I used my project's git repo so all the files in app/design are there.

I am coming from Wordpress so I read up the documentation and I understand I have to use php bin/magento setup:static-content:deploy to make the theme visible but while that command works on the development server it doesn't work on the local MAMP, same as any other bin/magento command (like cache:clean or setup:install etc - after a while I started trying randomly).

I was searching for this on stack forums and several people suggested to manually remove var/di, var/cache, var/page_cache and var/generation, which I did, and now the frontend and Magento backend are both down. The bin/magento commands still don't work.

How can I deploy Magento2 theme on localhost on a MAMP server?

The error:

[InvalidArgumentException]
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 I run one of the suggestions I get analogous error:

[InvalidArgumentException]
 Command "setup:store-config" is not defined.
 Did you mean one of these?
  setup:store-config:set
  setup:backup
  setup:config:set
  setup:cron:run
  setup:db-data:upgrade
  setup:db-schema:upgrade
  setup:db:status
  setup:di:compile
  setup:performance:generate-fixtures
  setup:install
  setup:rollback
  setup:upgrade
  setup:uninstall
  • There are no commands defined in the "setup:static-content" namespace.!!! please use php bin/magento setup:static-content:deploy – Sheshgiri Anvekar Mar 27 '17 at 13:39
0
  1. Make sure you have your app/etc/config.php and app/etc/env.php files
  2. give full permission to var and pub folders sudo chmod 777 -R var pub
-1

Sheshgiri Anvekar but that's what I used. it's written in the question.

I understand I have to use php bin/magento setup:static-content:deploy

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.