Skip to content

Develop/Build fails on extracting-queries with latest Gatsby (glob 7.2.2) #35654

@linfordbacon-ngenius

Description

@linfordbacon-ngenius

Preliminary Checks

Description

When attempting to use the YARN package manager, the gatsby develop server fails on the extract queries from components step with the error message:

Missing onError handler for invocation 'extracting-queries', error was 'TypeError: Cannot read properties of undefined (reading 'charAt')'. Stacktrace was 'TypeError: Cannot read properties of undefined
(reading 'charAt')

Reproduction Link

https://www.gatsbyjs.com/docs/tutorial/part-1/

Steps to Reproduce

  1. Install gatesby
  2. run gatesby new
  3. select 'yarn' as package manager (or ensure you have set this previously)
  4. run gatesby develop
  5. observe error

Expected Result

Several things:

  1. gatesby development server should start
  2. gatesby should provide a more useful error message

Actual Result

Missing onError handler for invocation 'extracting-queries', error was 'TypeError: Cannot read properties of undefined (reading 'charAt')'. Stacktrace was 'TypeError: Cannot read properties of undefined        
(reading 'charAt')
    at GlobSync._processReaddir (C:\Users\...\gatsby test\gatsby_yarn\node_modules\glob\sync.js:148:35)
    at GlobSync._process (C:\Users\...\gatsby test\gatsby_yarn\node_modules\glob\sync.js:132:10)
    at new GlobSync (C:\Users\...\gatsby test\gatsby_yarn\node_modules\glob\sync.js:45:10)
    at Function.sync (C:\Users\...\gatsby test\gatsby_yarn\node_modules\glob\sync.js:23:10)
    at reduce (C:\Users\...\gatsby test\gatsby_yarn\node_modules\gatsby\src\query\query-compiler.js:128:15)
    at Array.reduce (<anonymous>)
    at parseQueries (C:\Users\...\gatsby test\gatsby_yarn\node_modules\gatsby\src\query\query-compiler.js:126:5)
    at compile (C:\Users\...\gatsby test\gatsby_yarn\node_modules\gatsby\src\query\query-compiler.js:65:25)
    at updateStateAndRunQueries (C:\Users\...\gatsby test\gatsby_yarn\node_modules\gatsby\src\query\query-watcher.ts:223:40)
    at extractQueries (C:\Users\...\gatsby test\gatsby_yarn\node_modules\gatsby\src\services\extract-queries.ts:18:3)'

⠙ extract queries from components

Environment

System:
    OS: Windows 10 10.0.22000
    CPU: (16) x64 AMD Ryzen 7 5700G with Radeon Graphics         
  Binaries:
    Node: 18.1.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.15 - C:\Program Files\nodejs\yarn.CMD
    npm: 8.8.0 - C:\Program Files\nodejs\npm.CMD
  Languages:
    Python: 3.10.4
  Browsers:
    Edge: Spartan (44.22000.120.0), Chromium (101.0.1210.39)
  npmPackages:
    gatsby: ^4.14.0 => 4.14.0 
    gatsby-plugin-emotion: ^7.14.0 => 7.14.0 
  npmGlobalPackages:
    gatsby-cli: 4.14.0

Config Flags

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: confirmedIssue with steps to reproduce the bug that’s been verified by at least one reviewer.type: bugAn issue or pull request relating to a bug in Gatsbytype: upstreamIssues outside of Gatsby's control, caused by dependencies

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions