2

We are using Magento 2.4.5

Steps to install PWA -

1 - git clone https://github.com/magento-research/pwa-studio.git

2 - Install yarn from pwa-studio root directory yarn install

3 - Create the .env file at location pwa-studio\packages\venia-concept\ using following command

MAGENTO_BACKEND_URL="https://master-7rqtwti-mfwmkrjfqvbjk.us-4.magentosite.cloud/" yarn buildpack create-env-file packages/venia-concept

4 - export NODE_OPTIONS=--openssl-legacy-provider

5 - npx browserslist@latest --update-db

6 - Generate SSL Certificate using yarn buildpack create-custom-origin packages/venia-concept

7 - yarn run build

then getting this error on command -

TypeError: Cannot read properties of undefined (reading 'storeConfig')
    at /var/www/html/magento245/pwa-studio/packages/pwa-buildpack/lib/Utilities/graphQL.js:73:22
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async module.exports (/var/www/html/magento245/pwa-studio/packages/venia-concept/webpack.config.js:61:22)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed.
Exit code: 1
Command: /usr/bin/node
Arguments: /usr/share/yarn/lib/cli.js run build
Directory: /var/www/html/magento245/pwa-studio/packages/venia-concept
Output:

info Visit https://yarnpkg.com/en/docs/cli/workspace for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
1
  • 1
    Sumeet Bajaj found any solution? If yes please guide me. I would appreciated.
    – raheem.unr
    Commented Jul 22, 2023 at 16:27

2 Answers 2

2

Goto Magento root directory and execute cmd below :

composer require magento/pwa

php bin/magento module:enable --clear-static-content Magento_ContactGraphQlPwa

php bin/magento module:enable --clear-static-content Magento_NewsletterGraphQlPwa

php bin/magento module:enable --clear-static-content Magento_QuoteGraphQlPwa

After execute yarn command

1
  • @summet bajaj check my answer. Commented May 26, 2023 at 9:29
1

May this link solve your problem

https://www.integerbyteblog.in/magento/magento-2-cannot-find-field-newsletter_enabled-on-type-storeconfig-pwa-studio/

Run the below command in Magento root which is defined in the .env file of the PWA setup, In my case, I used “MAGENTO_BACKEND_URL=https://example.com/” URL in the .env file, so I will run the below command from the “https://example.com/” Magento root directory.

Commands:-

composer require magento/pwa

php bin/magento setup:upgrade

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

Then :

php bin/magento module:enable –clear-static-content Magento_ContactGraphQlPwa

php bin/magento module:enable –clear-static-content Magento_NewsletterGraphQlPwa

php bin/magento module:enable –clear-static-content Magento_QuoteGraphQlPwa

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.