Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gatsby-theme-i18n] Error: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined #101

Open
maiertech opened this issue Feb 3, 2021 · 1 comment

Comments

@maiertech
Copy link

I'm running into this error with gatsby-theme-i18n:

Screen Shot 2021-02-03 at 2 45 18 PM

This seems to be related to hot reloading because when I delete the cache and run it for the first time I see translated pages as expected. Therefore, I think that the theme is configured properly. Also there is no obvious reason why I would not have access to path (Node's path module) inside the gatsby-config.js.

So my question is this: is gatsby-theme-i18n under active development? Because it's not mentioned here: https://www.gatsbyjs.com/docs/how-to/adding-common-features/localization-i18n/. Or should I rather use gatsby-plugin-i18n or am I supposed to roll my own i18n?

@LekoArts Could you clarify?

@asterikx
Copy link

asterikx commented Jul 1, 2021

@maiertech I just run into the same issue. Are you loading MDX content through plugins other than gatsby-source-filesystem?
In my case, I was also using gatsby-source-contentful, which also creates nodes with internal type Mdx for Contentful rich text fields, but does not add the field fileAbsolutePath to the node.
gatsby-theme-i18n should skip Mdx nodes that have not been created by gatsby-source-filesystem, IMO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants