cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2 flush static cache

Magento 2 flush static cache

After install magento 2 I has errors like

ReferenceError: require is not defined

to solved this problem, I set develop mode

c:\xampp\php\php.exe -f d:\projects\localsites\magento.local\magento\bin\magento -- deploy:mod:set developer

and uncommened

SetEnv MAGE_MODE developer

after that install static content

c:\xampp\php\php.exe -f d:\projects\localsites\magento2.local\magento\bin\magento -- setup:static-content:deploy

and problem gone. After that I tried change some template, but as I know, I need flush static cache, and after that no one file a not generated in pub/static and problems with

ReferenceError: require is not defined

 come back  and I has only some empty folder is pub/static.
Maybe I do something wrong?

4 REPLIES 4

Re: Magento 2 flush static cache

You need not run the 

setup:static-content:deploy

in the developer mode. The static content is deployed automatically in the developer mode. 

Re: Magento 2 flush static cache

x_falkone_x? tell me please. Do you use en_US for default language during installation? Because I have same problem. During installation I used  ua_UA. And I think this is a bug. 

Re: Magento 2 flush static cache

I use all default options, and en_US

Re: Magento 2 flush static cache

If I don't install static content, I can't do nothing, and BO navigation menu doesn't work. My method to enable developer mode is correct?