gatsbyjs / gatsby

The best React-based framework with performance, scalability and security built in.
https://www.gatsbyjs.com
MIT License
55.2k stars 10.33k forks source link

"extract queries from components" does not follow webpack config #34857

Closed Floriferous closed 2 years ago

Floriferous commented 2 years ago

Preliminary Checks

Description

Our deploy step has stopped working at the extract queries from components, in a file that isn't even imported during the build process:

success onPreExtractQueries - 0.001s

 ERROR #85911  GRAPHQL

There was a problem parsing "/User/flo/very-long-path/somePlugin/src_core_components_DialogSimple_index_js.index.js"; any GraphQL
fragments or queries in this file were not processed.

This may indicate a syntax error in the code, or it may be a file type
that Gatsby does not know how to parse.

File: src/core/assets/public/files/frontPlugin/src_core_components_DialogSimple_index_js.index.js

failed extract queries from components - 14.073s

This is some way related to #20507, as I also have no idea what the error is here. So instead I'd like to just ignore this file if possible.

I tried to edit the webpack.config.js file and use plugins: [new webpack.IgnorePlugin(/frontPlugin/)], but it has no effect.

Reproduction Link

-

Steps to Reproduce

  1. Have an error 85911 in your project, I don't know how to reproduce it
  2. Ignore the file with the error in your webpack config
  3. Notice that the error still exists when extract queries from components

Expected Result

I expect extract queries to follow the webpack config

Actual Result

It still parses the ignored file to try and extract a query.

Environment

System:
    OS: macOS 12.1
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.17.6 - /usr/local/bin/node
    Yarn: 1.21.1 - /usr/local/bin/yarn
    npm: 6.14.15 - /usr/local/bin/npm
  Languages:
    Python: 2.7.18 - /usr/bin/python
  Browsers:
    Chrome: 98.0.4758.102
    Firefox: 93.0
    Safari: 15.2
  npmPackages:
    gatsby: ^4.7.2 => 4.7.2 
    gatsby-image: ^3.11.0 => 3.11.0 
    gatsby-plugin-bundle-stats: ^3.2.0 => 3.2.5 
    gatsby-plugin-canonical-urls: ^4.0.0 => 4.7.0 
    gatsby-plugin-csp: ^1.1.3 => 1.1.3 
    gatsby-plugin-force-trailing-slashes: ^1.0.5 => 1.0.5 
    gatsby-plugin-gdpr-cookies: ^2.0.8 => 2.0.8 
    gatsby-plugin-google-fonts: ^1.0.1 => 1.0.1 
    gatsby-plugin-google-tagmanager: ^4.0.0 => 4.7.0 
    gatsby-plugin-hotjar: ^1.1.1 => 1.1.1 
    gatsby-plugin-image: ^2.0.0 => 2.7.0 
    gatsby-plugin-loadable-components-ssr: ^4.0.0 => 4.2.0 
    gatsby-plugin-lodash: ^5.0.0 => 5.7.0 
    gatsby-plugin-manifest: ^4.0.0 => 4.7.0 
    gatsby-plugin-material-ui: ^4.0.2 => 4.1.0 
    gatsby-plugin-netlify: ^3.14.0 => 3.14.0 
    gatsby-plugin-no-sourcemaps: ^4.0.0 => 4.7.0 
    gatsby-plugin-preact: ^6.0.0 => 6.7.0 
    gatsby-plugin-preconnect: ^1.2.1 => 1.3.0 
    gatsby-plugin-prismic-previews: ^5.0.0 => 5.2.5 
    gatsby-plugin-react-helmet: ^5.0.0 => 5.7.0 
    gatsby-plugin-remove-serviceworker: ^1.0.0 => 1.0.0 
    gatsby-plugin-robots-txt: ^1.6.14 => 1.7.0 
    gatsby-plugin-sass: ^5.7.0 => 5.7.0 
    gatsby-plugin-sharp: ^4.0.1 => 4.7.0 
    gatsby-plugin-sitemap: 5.1.0 => 5.1.0 
    gatsby-plugin-split-css: ^2.0.0 => 2.0.2 
    gatsby-plugin-webpack-bundle-analyser-v2: ^1.1.25 => 1.1.26 
    gatsby-source-filesystem: ^4.0.0 => 4.7.0 
    gatsby-source-prismic: ^5.0.0 => 5.2.5 
    gatsby-transformer-sharp: ^4.0.0 => 4.7.0 
  npmGlobalPackages:
    gatsby-cli: 3.10.0

Config Flags

No flags

tyhopp commented 2 years ago

Hi @Floriferous!

Sorry to hear you're running into an issue. To help us best begin debugging the underlying cause, it is incredibly helpful if you're able to create a minimal reproduction. This is a simplified example of the issue that makes it clear and obvious what the issue is and how we can begin to debug it.

If you're up for it, we'd very much appreciate if you could provide a minimal reproduction and we'll be able to take another look.

Thanks for using Gatsby! 💜

github-actions[bot] commented 2 years ago

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! 💪💜

LekoArts commented 2 years ago

Hi!

Since we didn't receive an answer for 7 days or more about the ask of a reproduction I'm going to close this now, as we can't do much to help without a reproduction. If you are able to create a minimal reproduction for this then please do answer here or open a new issue with a reproduction. Thanks!