-
Notifications
You must be signed in to change notification settings - Fork 673
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
ModuleParseError: Module parse failed: Unexpected token (17:2) #2129
Comments
Thanks for the issue @t2ca. The error occurs when your theme depends on the I don't have a way to check this right now, but I'm interested if changing from JSX to export const wrapRootElement = ({ element }) =>
React.createElement(WrapRootElement, { element }) I'd guess that Gatsby transpiles plugins you depend on, but their dependencies are left untouched. We could switch to direct |
hey @hasparus, thank you for the quick reply! After making the change, I got a new error:
|
Awesome! That confirms my suspicion. We need to transpile all JSX in the plugin to make it work as a nested dependency. I'm considering doing this manually, but it may be a bit error prone — we'd have to make sure nobody uses JSX there again — so it might be better to just do it with |
Same problem here. Installation on site level works fine, but when used inside our Gatsby theme, we receive the Did you made any progress on this issue? |
@appsolut-jahn, @t2ca, could you try updating to |
|
@nicfitzgerald Could you include the full error message? |
That is the entire error message when I follow the Gatsby Theming Tutorial. I have copy and pasted everything from the tutorial so as to avoid mistyping. |
Any resolution to this? Following the same tutorial - hitting the same error... |
@LekoArts sorry for pinging you here, but would you have some advice what should we do? Compiling away JSX in themes and plugins seems to clash with the possibility of shadowing to me. |
I ran into the same error message when I had a theme name that didn't match the gatsby-theme prefix. Maybe that's your issue? |
I have recently experienced the following error during
gatsby develop
after upgrading theme-ui to v0.13.1 inside my Gatsby theme.This was never an issue with v0.12 or any other previous versions.
I am using Gatsby themes in my project and I have
theme-ui
,gatsby-plugin-theme-ui
, and other plugins installed inside my theme and not inside the project itself.I was able to solve this issue by installing
gatsby-plugin-theme-ui
inside my Gatsby site and removing it from my theme.Not sure why I'm now having this error, maybe its related to the breaking changes in v0.13?
The text was updated successfully, but these errors were encountered: