-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Closed
Closed
Copy link
Labels
status: confirmedIssue with steps to reproduce the bug that’s been verified by at least one reviewer.Issue 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 GatsbyAn issue or pull request relating to a bug in Gatsbytype: upstreamIssues outside of Gatsby's control, caused by dependenciesIssues outside of Gatsby's control, caused by dependencies
Description
Preliminary Checks
- This issue is not a duplicate. Before opening a new issue, please search existing issues: https://github.com/gatsbyjs/gatsby/issues
- This issue is not a question, feature request, RFC, or anything other than a bug report directly related to Gatsby. Please post those things in GitHub Discussions: https://github.com/gatsbyjs/gatsby/discussions
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
- Install gatesby
- run
gatesby new - select 'yarn' as package manager (or ensure you have set this previously)
- run
gatesby develop - observe error
Expected Result
Several things:
- gatesby development server should start
- 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.0Config Flags
No
barbalex, duongthaicuong, tuyetanh1990, Alexyoe, JamesIde and 4 moresea-solsea-sol
Metadata
Metadata
Assignees
Labels
status: confirmedIssue with steps to reproduce the bug that’s been verified by at least one reviewer.Issue 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 GatsbyAn issue or pull request relating to a bug in Gatsbytype: upstreamIssues outside of Gatsby's control, caused by dependenciesIssues outside of Gatsby's control, caused by dependencies