Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: Cannot find field "newsletter_enabled" on type StoreConfig, while building the pwa-studio #3565

Closed
3 of 8 tasks
JDhere opened this issue Nov 19, 2021 · 13 comments
Closed
3 of 8 tasks
Labels
bug Something isn't working

Comments

@JDhere
Copy link

JDhere commented Nov 19, 2021

Describe the bug

I have installed all the dependencies for the installation and have cloned the repo and gave yarn install.

I change the base url in the .env to my ip.
MAGENTO_BACKEND_URL=http://192.168.x.xx/

Then I ran the yarn build command

Then this error is coming:

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/html/magento243_v1/pwa-base/pwa-studio/packages/pwa-buildpack/lib/Utilities/graphQL.js:54:21
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async module.exports (/var/www/html/magento243_v1/pwa-base/pwa-studio/packages/venia-concept/webpack.config.js:61:29)
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/local/bin/node
Arguments: /usr/share/yarn/lib/cli.js run build
Directory: /var/www/html/magento243_v1/pwa-base/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.

I have also installed the metapackages from here
Still no use the same error comes...

And also I tried with the default backend url MAGENTO_BACKEND_URL=https://master-7rqtwti-mfwmkrjfqvbjk.us-4.magentosite.cloud/ and it this https://magento-venia-concept-xxxx.local.pwadev:8474/
But that page showed this error:
image

To reproduce

Steps to reproduce the behavior:

  1. Clone the repo
  2. cd dir
  3. yarn install
  4. Now change the value of .env file inside pwa-studio/packages/venia-concept/.env
  5. MAGENTO_BACKEND_URL=http://192.168.x.xx/
  6. yarn build

Expected behavior

It should have installed the theme and have shown on the frontend.

Screenshots

Screenshot from 2021-11-19 14-06-35

Possible solutions

No idea

Please complete the following device information:

  • Device [e.g. iPhone6, PC, Mac, Pixel3]: PC
  • Browser [e.g. Chrome, Safari]: Chrome
  • Browser Version [e.g. 22]: Version 96.0.4664.45 (Official Build) (64-bit)
  • Magento Version [e.g Magento Commerce 2.4]: Magento Community 2.4.3

Please let us know what packages this bug is in regards to:

  • venia-concept
  • venia-ui
  • pwa-buildpack
  • peregrine
  • pwa-devdocs
  • upward-js
  • upward-spec
  • create-pwa
@JDhere JDhere added the bug Something isn't working label Nov 19, 2021
@m2-assistant
Copy link

m2-assistant bot commented Nov 19, 2021

Hi @JDhere. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.

Add a comment to assign the issue: @magento I am working on this


@JDhere
Copy link
Author

JDhere commented Nov 19, 2021

@magento I am working on this

@m2-assistant
Copy link

m2-assistant bot commented Nov 19, 2021

Hi @JDhere! 👋
Thank you for collaboration. Only members of Community Contributors Team are allowed to be assigned to the issue. Please use @magento add to contributors team command to join Contributors team.

@Gokul19919
Copy link

Gokul19919 commented Nov 19, 2021

@magento I am also facing this issue

@Watch3ruk
Copy link

Watch3ruk commented Nov 23, 2021

in magento root :
composer require magento/pwa
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

@JDhere JDhere closed this as completed Nov 25, 2021
@HuyttTedd
Copy link

Thank you!

@spjoshis
Copy link

When i was installing magento/pwa, it gave below error

 Problem 1
    - magento/module-contact-graph-ql-pwa 0.2.0 requires php ~7.3.0||~7.4.0 -> your PHP version (8.1.4) does not satisfy that requirement.
    - magento/pwa 0.2.0 requires magento/module-contact-graph-ql-pwa 0.2.* -> satisfiable by magento/module-contact-graph-ql-pwa[0.2.0].
    - Installation request for magento/pwa ^0.2.0 -> satisfiable by magento/pwa[0.2.0].

Below are the environment details
Magento: 2.4.4
PHP: 8.1.4

@Watch3ruk
Copy link

ok , and you need help with ? says it all .
magento/module-contact-graph-ql-pwa 0.2.0 requires php ~7.3.0 you have 8.1.4 , rest fails on this . wait till pwa 12.4 they will have php 8.1 support .
or fork magento/pwa ^0.2.0 , made the changes install from the fork.

@spjoshis
Copy link

Thanks

@chrom
Copy link

chrom commented May 6, 2022

Magento 2.4.4

 composer require magento/pwa
Info from https://repo.packagist.org: #StandWithUkraine

In PackageDiscoveryTrait.php line 375:
                                                                                                                                                                                                                 
  Could not find a matching version of package magento/pwa. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-stability (stable). 

@Vasile-Peste
Copy link

in magento root :
composer require magento/pwa
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

Error 503 Backend fetch failed
Backend response right after enabling the components...

@danmooney2
Copy link
Member

Magento 2.4.4

 composer require magento/pwa
Info from https://repo.packagist.org: #StandWithUkraine

In PackageDiscoveryTrait.php line 375:
                                                                                                                                                                                                                 
  Could not find a matching version of package magento/pwa. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-stability (stable). 

Running composer config --no-interaction --ansi repositories.venia-sample-data composer https://repo.magento.com beforehand fixed the issue for me

@danmooney2
Copy link
Member

Also Magento_QuoteGraphQlPwa seems to have been removed and merged into core magento/magento2-pwa@96c5f5f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants