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

[gatsby-source-shopify] Build fails when using gatsbyImageData in two different GraphQL queries #32780

Closed
2 tasks done
lintonye opened this issue Aug 12, 2021 · 4 comments
Closed
2 tasks done
Assignees
Labels
topic: source-shopify Related to the gatsby-source-shopify plugin type: bug An issue or pull request relating to a bug in Gatsby

Comments

@lintonye
Copy link
Contributor

lintonye commented Aug 12, 2021

Preliminary Checks

Description

The latest Shopify plugin causes a strange file not found error when I tried to use gatsbyImageData in GraphQL.

Everything works in gatsby develop.

The build works if I turn on downloadImages in config of the Shopify plugin and use localFile in GraphQL.

10:27:07 PM: error There was an error in your GraphQL query:
10:27:07 PM: ENOENT: no such file or directory, stat '/opt/build/repo/.cache/caches/gatsby-source-shopify/tmp-feb8aee8d3f5451514aa0d526ecb2f8c.jpg'
10:27:07 PM:   39 |     price
10:27:07 PM:   40 |     compareAtPrice
10:27:07 PM:   41 |     sku
10:27:07 PM:   42 |     shopifyId
10:27:07 PM:   43 |     selectedOptions {
10:27:07 PM:   44 |       name
10:27:07 PM:   45 |       value
10:27:07 PM:   46 |     }
10:27:07 PM:   47 |   }
10:27:07 PM:   48 |   images {
10:27:07 PM: > 49 |     gatsbyImageData(placeholder: "BLURRED")
10:27:07 PM:      |     ^
10:27:07 PM:   50 |     originalSrc
10:27:07 PM:   51 |     altText
10:27:07 PM:   52 |   }
10:27:07 PM:   53 | }

Reproduction Link

https://github.com/lintonye/shopify-test

The only interesting part of this repo is that there are two almost identical pages, index and index2. Both export the same GraphQL query that accesses image data via gatsbyImageData.

Steps to Reproduce

gatsby build

Expected Result

Build completes successfully.

Actual Result

Build fails, with the error above.

Environment

System:
    OS: macOS 10.15.7
    CPU: (4) x64 Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz
    Shell: 5.6.2 - /usr/local/bin/zsh
  Binaries:
    Node: 15.14.0 - ~/.nvm/versions/node/v15.14.0/bin/node
    Yarn: 1.22.5 - ~/.yarn/bin/yarn
    npm: 7.7.6 - ~/.nvm/versions/node/v15.14.0/bin/npm
  Languages:
    Python: 2.7.16 - /usr/bin/python
  Browsers:
    Chrome: 92.0.4515.131
    Firefox: 89.0
    Safari: 14.0
  npmPackages:
    gatsby: ^3.11.1 => 3.11.1
    gatsby-cli: ^3.11.0 => 3.11.0
    gatsby-plugin-apollo: ^3.0.2 => 3.0.2
    gatsby-plugin-apollo-shopify: ^1.1.0 => 1.1.0
    gatsby-plugin-google-analytics: ^3.11.0 => 3.11.0
    gatsby-plugin-google-tagmanager: ^3.11.0 => 3.11.0
    gatsby-plugin-image: ^1.11.0 => 1.11.0
    gatsby-plugin-layout: ^2.11.0 => 2.11.0
    gatsby-plugin-manifest: ^3.11.0 => 3.11.0
    gatsby-plugin-modal-routing: ^1.2.0 => 1.2.0
    gatsby-plugin-netlify: ^3.11.0 => 3.11.0
    gatsby-plugin-offline: ^4.11.0 => 4.11.0
    gatsby-plugin-purgecss: ^6.0.2 => 6.0.2
    gatsby-plugin-react-helmet: ^4.11.0 => 4.11.0
    gatsby-plugin-sass: ^4.11.0 => 4.11.0
    gatsby-plugin-sharp: ^3.11.0 => 3.11.0
    gatsby-plugin-shopify-buy: 0.0.2 => 0.0.2
    gatsby-plugin-webpack-bundle-analyser-v2: ^1.1.18 => 1.1.24
    gatsby-query-params: ^1.2.1 => 1.2.1
    gatsby-remark-images-contentful: ^4.8.0 => 4.8.0
    gatsby-remark-images-zoom: ^1.1.0 => 1.1.0
    gatsby-source-contentful: ^5.11.1 => 5.11.1
    gatsby-source-filesystem: ^3.11.0 => 3.11.0
    gatsby-source-graphql: ^3.11.0 => 3.11.0
    gatsby-source-shopify: ^5.3.0 => 5.3.0
    gatsby-transformer-remark: ^4.8.0 => 4.8.0
    gatsby-transformer-sharp: ^3.11.0 => 3.11.0

Config Flags

No response

@lintonye lintonye added the type: bug An issue or pull request relating to a bug in Gatsby label Aug 12, 2021
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Aug 12, 2021
@lintonye lintonye changed the title [gatsby-source-shopify] Build fails [gatsby-source-shopify] Build fails when using gatsbyImageData in GraphQL Aug 12, 2021
@lintonye lintonye changed the title [gatsby-source-shopify] Build fails when using gatsbyImageData in GraphQL [gatsby-source-shopify] Build fails when using gatsbyImageData in two different GraphQL queries Aug 12, 2021
@LekoArts LekoArts added topic: source-shopify Related to the gatsby-source-shopify plugin and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Aug 13, 2021
@github-actions
Copy link

github-actions bot commented Sep 3, 2021

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@github-actions github-actions bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Sep 3, 2021
@8bitmatt
Copy link

Not stale. I'm running into the same issue. ☹️

"gatsby": "^3.2.1",
"gatsby-source-shopify": "^5.3.0",

@github-actions github-actions bot removed the stale? Issue that may be closed soon due to the original author not responding any more. label Sep 28, 2021
@github-actions
Copy link

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@github-actions github-actions bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Oct 18, 2021
@wardpeet wardpeet self-assigned this Oct 21, 2021
@LekoArts LekoArts removed the stale? Issue that may be closed soon due to the original author not responding any more. label Oct 22, 2021
@wardpeet
Copy link
Contributor

It should be fixed with #32544

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: source-shopify Related to the gatsby-source-shopify plugin type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests

4 participants