3

Running Magento 2.1

I am building a module with alert.js in the /view/frontend/web/ folder in my module: https://github.com/waynhall/frontend1/tree/master/Pulsestorm/FrontendTutorial1

However, after enabling the module and running magento setup:upgrade and magento setup:di:compile and reloading the homepage to generate the pub/static folder, there is no folder here as I would expect:

/var/www/magento.dev/public_html/pub/static/frontend/Magento/luma/en_US/Pulsestorm_FrontendTutorial1/ in order to serve the alert.js

What am I doing wrong?

3
  • Sorry. I meant hello.js, not alert.js.
    – Wayne
    Jul 31, 2016 at 1:06
  • 1
    Did you try to run static content deploy command? Jul 31, 2016 at 1:47
  • Thanks Khoa, sudo bin/magento setup:static-content:deploy Now it's there.
    – Wayne
    Jul 31, 2016 at 2:04

2 Answers 2

0

Run following command to generate pub/static directory

sudo php bin/magento setup:static-content:deploy 
0

in case if u have enabled opcache in your php.ini u will not see immediately the result. Also the images from the module are not added into pub/static folder. therefore to clear opcache do:

systemctl restart php<<version.minor>>-fpm i.e. systemctl restart php7.4-fpm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.