I've installed Magento 2 and set MAGE_MODE=production. However, I'm receiving a lot of JavaScript errors when visiting the home page (requireJS).
I tried flushing the cache and reploying static content files, to no avail.
I'm on the master branch of m2.
Best Answer
Generation of anything on the fly, including static content and classes, is prohibited in production mode. Once you enabled production mode and called
setup:static-content:deploy
it pre-generated everything needed to render the page. I would also recommend to runsetup:di:compile
anddev:css:deploy
.Alternatively you can run
deploy:mode:set
: it enables production mode, regenerates everything needed to be regenerated and changes the permissions on the filesystem. Official documentation is here