I am trying to edit one of the callbacks of the gdpr-cookie module in the directoy vendor/amasty/gdpr-cookie/view/frontend/web/js/cookies.js:

      allowCookies: function() {
            actionAllow().done(function() {

                //my code here


But when I compile and build it:

bin/magento setup:di:compile
bin/magento setup:static-content:deploy

The un-edited file show up in the static folder (pub/static/frontend/.../Amasty_GdprCookie/js/cookies.js) . So the lines that I added are not there. I also clear the cache each time.

What am I doing wrong? Is the module being loaded from another directory? Where should I edit it?

  • It could be a write permission issue. You can check it easily - just remove all visible content from the pub/static/ (or just one file) and regenerate static content. Commented Sep 20, 2021 at 20:21
  • thanks. I will try it. Commented Sep 20, 2021 at 20:35

2 Answers 2


Try to run these command and then check.

php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento indexer:reindex
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
sudo chmod -R 777 var/ generated/ pub/
  • thanks. it worked. Commented Sep 26, 2021 at 8:48

Try 777 permission using the chmod command.

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.