pwa-studio: Could not find a schema at lastCachedGraphQLSchema.json
I run the “yarn run build” command and I faced that given below issue. Please help me out. Thanks:-
:/var/www/html/magento23/pwa-studio$ yarn run build
yarn run v1.15.2
$ yarn workspaces run build
$ echo 'Skipping graphql-cli-validate-magento-pwa-queries build...'
Skipping graphql-cli-validate-magento-pwa-queries build...
$ concurrently --raw yarn:build:cjs yarn:build:esm
$ BABEL_ENV=development babel src --out-dir esm --root-mode 'upward' --source-maps
$ BABEL_ENV=production babel src --out-dir dist --root-mode 'upward' --source-maps
Successfully compiled 32 files with Babel.
Successfully compiled 49 files with Babel.
$ yarn run clean
$ rimraf dist
$ babel src --out-dir dist --root-mode 'root' --source-maps --copy-files
Successfully compiled 16 files with Babel.
$ yarn run clean && yarn run build:esm && yarn run validate-queries && yarn run build:prod
$ rimraf dist esm
$ BABEL_ENV=development babel src --out-dir esm --root-mode 'upward' --source-maps --copy-files
Successfully compiled 290 files with Babel.
$ yarn run download-schema && graphql validate-magento-pwa-queries --project venia
$ graphql get-schema --project venia
⚠ maximum redirect reached at: http://magento.local2/admin_rx200y/admin/index/index/key/d82ea5208d0cc660efbf78d01e078c0004844e19a1ad9079f8d58196170a9eea/
Validating GraphQL queries in venia project...
✖ An error occurred:
Could not find a schema at lastCachedGraphQLSchema.json.
Run 'graphql get-schema --project venia' to download the schema before running validate-magento-pwa-queries.
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 build
Directory: /var/www/html/magento23/pwa-studio/packages/venia-concept
Output:
info Visit https://yarnpkg.com/en/docs/cli/workspaces 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.`
Screenshots
Please complete the following device information:
- Ubuntu - 18.04
- Magento Version - 2.3
- Yarn v 1.15.2
- NPM version
npm -v
- 6.7 - Node Version
node -v
- 11.12
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 32 (14 by maintainers)
@LucasCalazans - It appears we’re not allowing insecure backends in query validation, which is why you’re seeing this error. I think it’s reasonable to add the
insecure: true
flag topackages/venia-concept/.graphqlconfig
so this validation works with self-signed certificates, especially since we only expect to validate queries in development environments (skipped in production builds). I’ll update the issue description with this proposed fix.In the meantime, if you change your
MAGENTO_BACKEND_URL
to http, this should get around the error, or you can manually add this flag to.graphqlconfig
.Edit: I’m actually going to create a new issue for this, since it’s different from the originally reported issue and few other comments in this thread. See #1311.
I think that the error I’m getting is the same reported:
Edit: Yes, this error was about the certificate. I’ve changed to HTTP and it has worked. Thanks @tjwiebell
Same issue here. Magento -> 2.3.1 PWA-Studio -> develop SO -> Fedora 26
After running
yarn run build
And the
which graphql
return:stat node_modules/.bin/graphql
:@sirugh thanks for reply, i figured out that issue on morning and it is running fine. Just i changed
MAGENTO_BACKEND_URL
-magento admin url
tomagento site url
. Thanks