cancel
Showing results for 
Search instead for 
Did you mean: 

New Extension installation issue, pub/static folder get empty

New Extension installation issue, pub/static folder get empty

Hi All,


I have a magento2 site . When i try to install a new extension, pub/static folder get empty.
Due to which all js and css stop working. Can anyone suggest me the solution for this problem.


Thanks

11 REPLIES 11

Re: New Extension installation issue, pub/static folder get empty

Hello @devdeft,

 

Please run below command in magento 2 root directory to generate content 

php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento setup:upgrade
rm -rf pub/static/frontend/* pub/static/adminhtml/* var/cache/ var/generation/ var/page_cache/ var/view_preprocessed/ var/composer_home generated/
php -dmemory_limit=6G bin/magento setup:static-content:deploy -f
chmod -Rf 777 pub/ var/
php bin/magento cache:clean

--

If my answer is useful, please Accept as Solution & give Kudos

Re: New Extension installation issue, pub/static folder get empty

Hello @devdeft

 

Please follow below steps:

 

chmod -R 777 pub/ var/ && rm -rf var/view_preprocessed/ var/cache/ var/page_cache/ var/tmp/php bin/magento cache:flush &php bin/magento setup:upgrade &&php bin/magento setup:static-content:deploy chmod -R 777 pub/ var/ generated/

then you can find CSS and JS in working mode. 

Manish Mittal
https://www.manishmittal.com/

Re: New Extension installation issue, pub/static folder get empty

thanks @gelanivishal 
But after run suggested commands , it shows nothings to import and pub/static folder get empty.
And front-end shows below errors
s1.png 

Re: New Extension installation issue, pub/static folder get empty

@Manish Mittal
Thanks for your reply .
I am new to magento 
can you please suggest what i have to do line by line and explain what will it do ?

Thanks Manish

Re: New Extension installation issue, pub/static folder get empty

@devdeft

 

Do you have an idea about CLI, you have to run all shared commands using CLI. 

 

Go to Magento root directory in CLI and run all shared commands in sequence. 

Manish Mittal
https://www.manishmittal.com/

Re: New Extension installation issue, pub/static folder get empty

Hi @devdeft

 

Try below steps in sequence , it will resolved your problem !

 

Remove pub/static [Keep the .htaccess backed up and copy it again]
Remove var/cache
Remove var/composer_home
Remove var/generation
Remove Generated
Remove var/page_cache
Remove var/view_preprocessed
chmod -R 775 pub/static/ var/ pub/media/ &&
run php bin/magento setup:static-content:deploy 
run php bin/magento cache:clean
run php bin/magento cache:flush

Hope it helps !

if issue solved,Click Kudos & Accept as Solution

Re: New Extension installation issue, pub/static folder get empty

i have a website 6 month old, i publish product review like kinderwagen test 2019 , my site now in WordPress  but at this time i am planning to migrate to Magento, have any issue if i do this plz clarify me.i have some confusion.

Re: New Extension installation issue, pub/static folder get empty

you just need to update the apache2.conf file.

 

dafont 192.168.l.l filehippo  

Re: New Extension installation issue, pub/static folder get empty

When you install the extension, clear the static cache before you use the extension on your store. You need to do this: System > Cache Management > Flush Static Files Cache.

 

192.168.0.1