I have installed pwa-studio by following magento pwa docs. Now when I try to run command "yarn run watch" got below error

$ webpack-dev-server --progress --color --env.mode development
As of version 12.1.0, PWA Studio requires the appropriate PWA metapackage to be installed on the backend.
For more information, refer to the 12.1.0 release notes here: https://github.com/magento/pwa-studio/releases/tag/v12.1.0
Error: Cannot query field "newsletter_enabled" on type "StoreConfig". (... 1 errors total)
    at /var/www/vhosts/mysite.com/htdocs/pwa-studio/node_modules/@magento/pwa-buildpack/lib/Utilities/graphQL.js:54:21
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async module.exports (/var/www/vhosts/mysite.com/htdocs/pwa-studio/webpack.config.js:62:29)

I already installed metapackage still this issue happening. Does anyone have any idea how to solve this?

Magento version: 2.4.1

Php: 7.3

  • did you find the solution for this? Apr 7, 2022 at 7:52
  • 1
    Not actually. I ended up using Magento 2.4.3 and php version 7.4 and that solved the issue.
    – Nayem323
    Apr 28, 2022 at 9:12
  • I have cloned my cloud magento in my localhost. So do I need to give my cloud instance URL or my local URL in the .env file? Mar 30 at 5:06
  • @biplabrout whichever you want to use as your backend.
    – Nayem323
    Mar 30 at 7:05
  • In PWA I am using product recommendations. But environment id, store view code are empty. Any reason ? Mar 31 at 10:42

2 Answers 2


Run the below command in Magento root which is defined in the .env file of the PWA setup

composer require magento/pwa

php bin/magento setup:upgrade

php bin/magento setup:static-content:deploy -f

I have found a RCA and updated the configuration accordingly and an issue got resolved.

Actually Magento looking the newsletter_enabled value from the core_config_data table (newsletter/general/active). If the entry does not exist in the table then we will face the above issue.

enter image description here

So simply go to Stores > Configuration > Customers > Newsletter enable/disable the configuration once and make sure the above entry added in the core_config_data table. That's It.

enter image description here

enter image description here

Your Answer

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

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