I have this error after set developer mode in Magento 2.
I have tried to deploy static content, clean cache, flush cache, etc...
Any idea?
Check inside your app/etc/env.php
file, to see your it's in developer mode:
'MAGE_MODE' => 'developer',
Then run these commands below to delete the generated files and generate them again.
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
php bin/magento setup:di:compile
Run these commands below to set your cookie_domain and generate all content again.
curl -O https://files.magerun.net/n98-magerun2.phar && \
chmod +x ./n98-magerun2.phar && \
alias n98="./n98-magerun2.phar" && \
n98 config:store:set web/unsecure/base_url 'http://magento.local.com/' && \
n98 config:store:set web/secure/base_url 'http://magento.local.com/' && \
n98 config:store:set web/cookie/cookie_domain 'magento.local.com' && \
n98 setup:upgrade && \
n98 setup:static-content:deploy -f && \
php bin/magento setup:di:compile