简体   繁体   English

Magento2部署CSS / JS

[英]Magento2 deployment CSS/JS

Hi I had installed magento2 with sample data. 嗨,我已经安装了带有示例数据的magento2。 I would deploy static css/JS but the command php bin/magento setup:static-content:deploy it return 0 error but the problem still here. 我会部署静态的CSS / JS,但是命令php bin/magento setup:static-content:deploy返回0错误,但问题仍然存在。 Also I can't find deploy.php file in the standard dir. 另外,我在标准目录中找不到deploy.php文件。

使用以下命令导入样本数据

php bin/magento setup:static-content:deploy -f
php bin/magento indexer:reindex
php bin/magento cache:flush

You have written 你写

"bin/magento setup:static-content:deploy it" “ bin / magento设置:静态内容:部署它”

but it should be 但这应该是

"bin/magento setup:static-content:deploy" “ bin / magento设置:静态内容:部署”

or 要么

"bin/magento setup:static-content:deploy language_code" “ bin / magento设置:静态内容:部署语言代码”

You can use below command to deploy pub/static contents: - 您可以使用以下命令部署发布/静态内容:-

php bin/magento setup:static-content:deploy en_US es_ES php bin / magento设置:静态内容:部署en_US es_ES

en_US and es_ES are the language directory. en_US和es_ES是语言目录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM