Skip to content

[gatsby-plugin-mdx] default layouts prevent compilation #35589

@heddendorp

Description

@heddendorp

Preliminary Checks

Description

When using the defaultLayouts option in the mdx plugin I can no longer start gatsby as it crashes on compilation

Reproduction Link

https://github.com/heddendorp/developer-portal

Steps to Reproduce

  1. clone repo
  2. install deps
  3. run gatsby develop

Expected Result

The default layout is applied to my pages

Actual Result

The development process crashes at compilation

success compile gatsby files - 2.546s

 ERROR #11902  COMPILATION

We encountered an error while trying to compile your site's gatsby-config. Please fix the error and try again.



  TypeError: (void 0) is not a function
  
  - gatsby-config.js:1 Object.b3siR.@parcel/transformer-js/src/esmodule-helpers.js
    /Users/lu.heddendorpcelonis.com/code/labs/developer-portal/.cache/compiled/gatsby-config.js:1:1654
  
  - gatsby-config.js:1 s
    /Users/lu.heddendorpcelonis.com/code/labs/developer-portal/.cache/compiled/gatsby-config.js:1:708
  
  - gatsby-config.js:1 
    /Users/lu.heddendorpcelonis.com/code/labs/developer-portal/.cache/compiled/gatsby-config.js:1:1123
  
  - gatsby-config.js:1 Object.<anonymous>
    /Users/lu.heddendorpcelonis.com/code/labs/developer-portal/.cache/compiled/gatsby-config.js:1:1282
  
  - loader:1105 Module._compile
    node:internal/modules/cjs/loader:1105:14
  
  - loader:1159 Object.Module._extensions..js
    node:internal/modules/cjs/loader:1159:10
  
  - loader:981 Module.load
    node:internal/modules/cjs/loader:981:32
  
  - loader:822 Function.Module._load
    node:internal/modules/cjs/loader:822:12
  
  - loader:1005 Module.require
    node:internal/modules/cjs/loader:1005:19
  
  - helpers:102 require
    node:internal/modules/cjs/helpers:102:18
  
  - get-config-file.ts:34 getConfigFile
    [developer-portal]/[gatsby]/src/bootstrap/get-config-file.ts:34:20
  
  - index.ts:22 loadConfig
    [developer-portal]/[gatsby]/src/bootstrap/load-config/index.ts:22:50
  
  - initialize.ts:179 initialize
    [developer-portal]/[gatsby]/src/services/initialize.ts:179:24
  
  - task_queues:96 processTicksAndRejections
    node:internal/process/task_queues:96:5

Environment

System:
    OS: macOS 12.3.1
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.15.0 - ~/.volta/tools/image/node/16.15.0/bin/node
    Yarn: 1.22.18 - ~/.volta/bin/yarn
    npm: 8.5.5 - ~/.volta/tools/image/node/16.15.0/bin/npm
  Languages:
    Python: 3.9.7 - /Users/lu.heddendorpcelonis.com/opt/anaconda3/bin/python
  Browsers:
    Firefox: 99.0.1
    Safari: 15.4
  npmPackages:
    gatsby: ^4.13.1 => 4.13.1 
    gatsby-plugin-layout: ^3.13.0 => 3.13.0 
    gatsby-plugin-mdx: ^3.13.0 => 3.13.0 
    gatsby-plugin-react-helmet: ^5.13.0 => 5.13.0 
    gatsby-plugin-sass: ^5.13.0 => 5.13.0 
    gatsby-plugin-sitemap: ^5.13.0 => 5.13.0 
    gatsby-source-filesystem: ^4.13.0 => 4.13.0

Config Flags

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs reproductionThis issue needs a simplified reproduction of the bug for further troubleshooting.topic: remark/mdxRelated to Markdown, remark & MDX ecosystemtype: bugAn issue or pull request relating to a bug in Gatsby

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions