Skip to content

Key is larger than maximum key size (1978) #33887

Answered by LekoArts
Vacilando asked this question in Help
Discussion options

You must be logged in to vote

It is very unlikely that we'll change the default key length as that would open the door for decreased performance. In this instance the plugin is at fault as the id should be generated with createNodeId().

Instead of passing the full path as an id it should use the createNodeId() helper function:

https://github.com/Kornil/gatsby-plugin-google-analytics-reporter/blob/7ae7c6f67f880c0311645d5ef369bb749a100054/gatsby-node.js#L63

Helper function: https://www.gatsbyjs.com/docs/reference/config-files/node-api-helpers/#createNodeId

Truncating the path before passing it into createNodeId() is probably not necessary.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Vacilando
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants