angeloocana / gatsby-plugin-i18n

Multi language routes for Gatsby
435 stars 77 forks source link

Cannot read property 'createNodeField' of undefined #68

Closed ningo-agilityio closed 5 years ago

ningo-agilityio commented 5 years ago

Hi, This is my error:

Cannot read property 'createNodeField' of undefined
- onCreateNode.js:61
    xx]/[gatsby-plugin-i18n]/onCreateNode.js:61:37

And this is my dependencies:

"gatsby": "^1.9.158",
"gatsby-image": "^1.0.42",
"gatsby-link": "^1.6.34",
"gatsby-plugin-i18n": "^1.0.1",
"gatsby-plugin-manifest": "^1.0.27",
"gatsby-plugin-offline": "^1.0.18",
"gatsby-plugin-react-helmet": "^2.0.3",
"gatsby-plugin-sharp": "^1.6.41",
"gatsby-plugin-styled-components": "^2.0.9",
"gatsby-source-contentful": "^1.3.44",
"gatsby-source-filesystem": "^1.5.18",
"gatsby-transformer-json": "^1.0.16",
"gatsby-transformer-remark": "^1.7.37",
"gatsby-transformer-sharp": "^1.6.22",
"intl": "^1.2.5",
"react-helmet": "^5.2.0",
"react-intl": "^2.9.0"

Anyone here face this issue? I don't know I missed any configuration. I'm following this guideline https://github.com/mccrodp/gatsby-starter-contentful-i18n/. I did follow this solution but it still doesn't work for me https://github.com/gaearon/overreacted.io/issues/71. Hope to get your answers soon. Thanks.

ningo-agilityio commented 5 years ago

I figured out the reason, "gatsby-plugin-i18n": "^1.0.1" only works with gatsby v2. So I downgrade it to 0.4.2 and it worked.