[X] 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
I am upgrading from v3 to v4.
My gatsby-config.js contains gatsby-remark-copy-linked-files:
When I run yarn dev after upgrading, this happens:
$ gatsby develop
warn Warning: there are unknown plugin options for "gatsby-transformer-remark": commonmark, pedantic
Please open an issue at ghub.io/gatsby-transformer-remark if you believe this option is valid.
success open and validate gatsby-configs, load plugins - 0.955s
success onPreInit - 0.006s
success initialize cache - 0.040s
success copy gatsby files - 0.148s
success Compiling Gatsby Functions - 0.308s
success onPreBootstrap - 0.327s
ERROR #11321 PLUGIN
"gatsby-transformer-remark" threw an error while running the createSchemaCustomization lifecycle:
Cannot read properties of undefined (reading 'createSchemaCustomization')
TypeError: Cannot read properties of undefined (reading 'createSchemaCustomization')
- create-schema-customization.js:47
[ae2]/[gatsby-transformer-remark]/create-schema-customization.js:47:31
- Array.forEach
- create-schema-customization.js:44 Object.module.exports [as createSchemaCustomization]
[ae2]/[gatsby-transformer-remark]/create-schema-customization.js:44:11
- api-runner-node.js:430 runAPI
[ae2]/[gatsby]/src/utils/api-runner-node.js:430:22
- api-runner-node.js:581 Promise.catch.decorateEvent.pluginName
[ae2]/[gatsby]/src/utils/api-runner-node.js:581:13
- debuggability.js:384 Promise._execute
[ae2]/[bluebird]/js/release/debuggability.js:384:9
- promise.js:518 Promise._resolveFromExecutor
[ae2]/[bluebird]/js/release/promise.js:518:18
- promise.js:103 new Promise
[ae2]/[bluebird]/js/release/promise.js:103:10
- api-runner-node.js:579
[ae2]/[gatsby]/src/utils/api-runner-node.js:579:16
- util.js:16 tryCatcher
[ae2]/[bluebird]/js/release/util.js:16:23
- reduce.js:166 Object.gotValue
[ae2]/[bluebird]/js/release/reduce.js:166:18
- reduce.js:155 Object.gotAccum
[ae2]/[bluebird]/js/release/reduce.js:155:25
- util.js:16 Object.tryCatcher
[ae2]/[bluebird]/js/release/util.js:16:23
- promise.js:547 Promise._settlePromiseFromHandler
[ae2]/[bluebird]/js/release/promise.js:547:31
- promise.js:604 Promise._settlePromise
[ae2]/[bluebird]/js/release/promise.js:604:18
- promise.js:649 Promise._settlePromise0
[ae2]/[bluebird]/js/release/promise.js:649:10
success createSchemaCustomization - 0.113s
success Checking for changed pages - 0.002s
success source and transform nodes - 0.193s
ERROR #11321 PLUGIN
"gatsby-transformer-remark" threw an error while running the setFieldsOnGraphQLNodeType lifecycle:
Cannot read properties of undefined (reading 'setParserPlugins')
TypeError: Cannot read properties of undefined (reading 'setParserPlugins')
- extend-node-type.js:146
[ae2]/[gatsby-transformer-remark]/extend-node-type.js:146:39
- new Promise
- extend-node-type.js:111 Object.remarkExtendNodeType [as setFieldsOnGraphQLNodeType]
[ae2]/[gatsby-transformer-remark]/extend-node-type.js:111:10
- api-runner-node.js:430 runAPI
[ae2]/[gatsby]/src/utils/api-runner-node.js:430:22
- api-runner-node.js:581 Promise.catch.decorateEvent.pluginName
[ae2]/[gatsby]/src/utils/api-runner-node.js:581:13
- debuggability.js:384 Promise._execute
[ae2]/[bluebird]/js/release/debuggability.js:384:9
- promise.js:518 Promise._resolveFromExecutor
[ae2]/[bluebird]/js/release/promise.js:518:18
- promise.js:103 new Promise
[ae2]/[bluebird]/js/release/promise.js:103:10
- api-runner-node.js:579
[ae2]/[gatsby]/src/utils/api-runner-node.js:579:16
- util.js:16 tryCatcher
[ae2]/[bluebird]/js/release/util.js:16:23
- reduce.js:166 Object.gotValue
[ae2]/[bluebird]/js/release/reduce.js:166:18
- reduce.js:155 Object.gotAccum
[ae2]/[bluebird]/js/release/reduce.js:155:25
- util.js:16 Object.tryCatcher
[ae2]/[bluebird]/js/release/util.js:16:23
- promise.js:547 Promise._settlePromiseFromHandler
[ae2]/[bluebird]/js/release/promise.js:547:31
- promise.js:604 Promise._settlePromise
[ae2]/[bluebird]/js/release/promise.js:604:18
- promise.js:649 Promise._settlePromise0
[ae2]/[bluebird]/js/release/promise.js:649:10
ERROR #11321 PLUGIN
"gatsby-transformer-remark" threw an error while running the setFieldsOnGraphQLNodeType lifecycle:
Cannot read properties of undefined (reading 'setParserPlugins')
TypeError: Cannot read properties of undefined (reading 'setParserPlugins')
- extend-node-type.js:146
[ae2]/[gatsby-transformer-remark]/extend-node-type.js:146:39
- new Promise
- extend-node-type.js:111 Object.remarkExtendNodeType [as setFieldsOnGraphQLNodeType]
[ae2]/[gatsby-transformer-remark]/extend-node-type.js:111:10
- api-runner-node.js:430 runAPI
[ae2]/[gatsby]/src/utils/api-runner-node.js:430:22
- api-runner-node.js:581 Promise.catch.decorateEvent.pluginName
[ae2]/[gatsby]/src/utils/api-runner-node.js:581:13
- debuggability.js:384 Promise._execute
[ae2]/[bluebird]/js/release/debuggability.js:384:9
- promise.js:518 Promise._resolveFromExecutor
[ae2]/[bluebird]/js/release/promise.js:518:18
- promise.js:103 new Promise
[ae2]/[bluebird]/js/release/promise.js:103:10
- api-runner-node.js:579
[ae2]/[gatsby]/src/utils/api-runner-node.js:579:16
- util.js:16 tryCatcher
[ae2]/[bluebird]/js/release/util.js:16:23
- reduce.js:166 Object.gotValue
[ae2]/[bluebird]/js/release/reduce.js:166:18
- reduce.js:155 Object.gotAccum
[ae2]/[bluebird]/js/release/reduce.js:155:25
- util.js:16 Object.tryCatcher
[ae2]/[bluebird]/js/release/util.js:16:23
- promise.js:547 Promise._settlePromiseFromHandler
[ae2]/[bluebird]/js/release/promise.js:547:31
- promise.js:604 Promise._settlePromise
[ae2]/[bluebird]/js/release/promise.js:604:18
- promise.js:649 Promise._settlePromise0
[ae2]/[bluebird]/js/release/promise.js:649:10
ERROR #11321 PLUGIN
"gatsby-transformer-remark" threw an error while running the setFieldsOnGraphQLNodeType lifecycle:
Cannot read properties of undefined (reading 'setParserPlugins')
TypeError: Cannot read properties of undefined (reading 'setParserPlugins')
- extend-node-type.js:146
[ae2]/[gatsby-transformer-remark]/extend-node-type.js:146:39
- new Promise
- extend-node-type.js:111 Object.remarkExtendNodeType [as setFieldsOnGraphQLNodeType]
[ae2]/[gatsby-transformer-remark]/extend-node-type.js:111:10
- api-runner-node.js:430 runAPI
[ae2]/[gatsby]/src/utils/api-runner-node.js:430:22
- api-runner-node.js:581 Promise.catch.decorateEvent.pluginName
[ae2]/[gatsby]/src/utils/api-runner-node.js:581:13
- debuggability.js:384 Promise._execute
[ae2]/[bluebird]/js/release/debuggability.js:384:9
- promise.js:518 Promise._resolveFromExecutor
[ae2]/[bluebird]/js/release/promise.js:518:18
- promise.js:103 new Promise
[ae2]/[bluebird]/js/release/promise.js:103:10
- api-runner-node.js:579
[ae2]/[gatsby]/src/utils/api-runner-node.js:579:16
- util.js:16 tryCatcher
[ae2]/[bluebird]/js/release/util.js:16:23
- reduce.js:166 Object.gotValue
[ae2]/[bluebird]/js/release/reduce.js:166:18
- reduce.js:155 Object.gotAccum
[ae2]/[bluebird]/js/release/reduce.js:155:25
- util.js:16 Object.tryCatcher
[ae2]/[bluebird]/js/release/util.js:16:23
- promise.js:547 Promise._settlePromiseFromHandler
[ae2]/[bluebird]/js/release/promise.js:547:31
- promise.js:604 Promise._settlePromise
[ae2]/[bluebird]/js/release/promise.js:604:18
- promise.js:649 Promise._settlePromise0
[ae2]/[bluebird]/js/release/promise.js:649:10
success building schema - 0.697s
success createPages - 0.082s
success createPagesStatefully - 0.171s
info Total nodes: 144, SitePage nodes: 20 (use --verbose for breakdown)
success Checking for changed pages - 0.001s
success write out redirect data - 0.002s
success Build manifest and related icons - 0.096s
success onPostBootstrap - 0.102s
info bootstrap finished - 4.948s
success onPreExtractQueries - 0.001s
ERROR #85923 GRAPHQL
There was an error in your GraphQL query:
Cannot query field "html" on type "MarkdownRemark".
If you don't expect "html" to exist on the type "MarkdownRemark" it is most likely a typo.
However, if you expect "html" to exist there are a couple of solutions to common problems:
- If you added a new data source and/or changed something inside gatsby-node.js/gatsby-config.js, please try a restart of your development server
- The field might be accessible in another subfield, please try your query in GraphiQL and use the GraphiQL explorer to see which fields you can query and what shape they have
- You want to optionally use your field "html" and right now it is not used anywhere. Therefore Gatsby can't infer the type and add it to the GraphQL schema. A quick fix is to add at least one entry with that field ("dummy content")
It is recommended to explicitly type your GraphQL schema if you want to use optional fields. This way you don't have to add the mentioned "dummy content". Visit our docs to learn how you can define the schema for "MarkdownRemark":
https://www.gatsbyjs.com/docs/reference/graphql-data-layer/schema-customization#creating-type-definitions
File: src\templates\docTemplate.js:159:7
failed extract queries from components - 4.263s
success write out requires - 0.023s
success run page queries - 0.008s - 1/1 119.85/s
⠀
You can now view artdaten in the browser.
⠀
http://localhost:8000/
⠀
View GraphiQL, an in-browser IDE, to explore your site's data and schema
⠀
http://localhost:8000/___graphql
⠀
Note that the development build is not optimized.
To create a production build, use gatsby build
⠀
success Building development bundle - 6.230s
success Writing page-data.json files to public directory - 0.262s - 3/20 76.21/s
When uncomment gatsby-remark-copy-linked-files everything works fine.
Preliminary Checks
Description
I am upgrading from v3 to v4.
My gatsby-config.js contains
gatsby-remark-copy-linked-files
:When I run
yarn dev
after upgrading, this happens:When uncomment gatsby-remark-copy-linked-files everything works fine.
Reproduction Link
https://github.com/barbalex/ae2
Steps to Reproduce
yarn
yarn dev
Sorry, I don't know how to build the reproduction correctly so this is my repo.
Expected Result
The error should not happen.
Actual Result
See above, "what I am seeing".
Environment
Config Flags
No response