cancel
Showing results for 
Search instead for 
Did you mean: 

If you still want to deploy in these modes, use -f option.What is it?

SOLVED

If you still want to deploy in these modes, use -f option.What is it?

The situation was this, after installation and configuration, it is not clear why the goods are added to the basket, but that's all, further ordering does not occur. There is not even a “continue placing an order” button. I don’t know why maybe something is wrong.

I was advised to run the command:

bin/magento setup:static-content:deploy

But when I execute this command, I get this error:

In DeployStaticContentCommand.php line 108:
NOTE: Manual static content deployment is not required in "default" and "developer" modes.
In "default" and "developer" modes static contents are being deployed autom atically on demand.
If you still want to deploy in these modes, use -f option: 'bin/magento setup:static-content:deploy -f'

Is this command out of date? Or is it somehow necessary to indicate it differently? I can’t understand it ...

 

they write on the Internet if this command does not work, you need to add sudo at the very beginning, but it also does not help, the command error is the same.
Which command should I use? Which one will be right?
And how to correct continuation of the order process?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: If you still want to deploy in these modes, use -f option.What is it?

You can check current deploy mode using following command:

php bin/magento deploy:mode:show

To change to mode

bin/magento deploy:mode:set developer

For more info :
https://devdocs.magento.com/guides/v2.3/config-guide/cli/config-cli-subcommands-mode.html

I hope it will help you!

View solution in original post

4 REPLIES 4

Re: If you still want to deploy in these modes, use -f option.What is it?

Hi @yuriy_evgenich,

In magento 2, bin/magento setup:static-content:deploy is used to deploy static content in a directory called "pub/static/".

There are three modes in magento 2, default, developer, production.

For developer and default mode we don't need to run the above command, but sometime on the server some files are not autogenerated. Then we need to use "-f" with the command to generate the static files forcefully. "-f" stands here forcefully.

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

You all need to give full permission 0777 for var, pub/static, generated folder.

I hope it will help you you or let me know if you have any questions.

Re: If you still want to deploy in these modes, use -f option.What is it?

Hello @yuriy_evgenich ,

As your site is in default mode so you need to deploy the static content forcefully. For that -f is used with bin/magento setup:stattic-content:deploy

If your site is not currently used by any user(customers), it is better to switch it in developer mode so that it would be easy for you to get the error which you are facing in order. To switch to developer mode use the below command:

bin/magento deploy:mode:set developer

If you don't want to switch the developer mode, you can check the errors in var/report folder.

Please try to deploy your static content and check the order button issue, if still you face the same problem, please let us know.

Thank you.   

Re: If you still want to deploy in these modes, use -f option.What is it?

@Sarvagya Pandey Unfortunately, this did not help and the problem has not been resolved so far. Maybe you should try reinstalling the CMS afterwards?

 

 

Re: If you still want to deploy in these modes, use -f option.What is it?

You can check current deploy mode using following command:

php bin/magento deploy:mode:show

To change to mode

bin/magento deploy:mode:set developer

For more info :
https://devdocs.magento.com/guides/v2.3/config-guide/cli/config-cli-subcommands-mode.html

I hope it will help you!