Skip to content

Webpack error querying mdx.html in GraphiQL #35771

@notexactlyawe

Description

@notexactlyawe

Preliminary Checks

Description

Trying to query the field mdx.html from GraphiQL loads forever on the web interface and gives an error in the console running gatsby develop.

Query:

query MyQuery {
  mdx {
    html
  }
}

Console error:

 ERROR

Error: Conflict: Multiple chunks emit assets to the same filename output.js (chunks main and framework)
    at C:\Users\cmacl\src\mdx-bug-repro\node_modules\webpack\lib\Compilation.js:4610:12
    at C:\Users\cmacl\src\mdx-bug-repro\node_modules\webpack\lib\Cache.js:91:34
    at Array.<anonymous> (C:\Users\cmacl\src\mdx-bug-repro\node_modules\webpack\lib\cache\MemoryWithGcCachePlugin.js:116:13)
    at C:\Users\cmacl\src\mdx-bug-repro\node_modules\webpack\lib\Cache.js:91:19
    at eval (eval at create (C:\Users\cmacl\src\mdx-bug-repro\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:27:1)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Despite the environment below, this occurred in Firefox 100.0

Reproduction Link

https://github.com/notexactlyawe/mdx-bug-repro

Steps to Reproduce

  1. Run gatsby develop
  2. Visit http://localhost:8000/___graphq
  3. Paste the query in the description into the interface
  4. Click the play button
  5. Observe the error

Expected Result

A GraphQL response for the query would be given.

Actual Result

GraphiQL shows a loading spinner and the gatsby develop output shows an error.

Environment

System:
    OS: Windows 10 10.0.22000
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  Binaries:
    Node: 16.15.0 - C:\Program Files\nodejs\node.EXE
    npm: 8.5.5 - C:\Program Files\nodejs\npm.CMD
  Languages:
    Python: 3.10.4
  Browsers:
    Chrome: 101.0.4951.67
    Edge: Spartan (44.22000.120.0), Chromium (101.0.1210.53)
  npmPackages:
    gatsby: ^4.16.0-next.0 => 4.16.0-next.0 
    gatsby-plugin-mdx: ^3.15.0 => 3.15.0 
    gatsby-source-filesystem: ^4.15.0 => 4.15.0 
  npmGlobalPackages:
    gatsby-cli: 4.15.0

Config Flags

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueIssue that doesn't require previous experience with Gatsbystatus: confirmedIssue with steps to reproduce the bug that’s been verified by at least one reviewer.topic: remark/mdxRelated to Markdown, remark & MDX ecosystemtype: documentationAn issue or pull request for improving or updating Gatsby's documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions