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 develop has started failing #12

Open
hrishikesh-k opened this issue Aug 5, 2020 · 1 comment
Open

gatsby develop has started failing #12

hrishikesh-k opened this issue Aug 5, 2020 · 1 comment

Comments

@hrishikesh-k
Copy link

hrishikesh-k commented Aug 5, 2020

Hello.

I was working on customizing the theme before adding my content. However, yesterday, out of nowhere, gatsby develop started returning errors.

"gatsby-plugin-mdx" threw an error while running the onCreateNode lifecycle:

unknown: Support for the experimental syntax 'doExpressions' isn't currently enabled (56:2):

  54 | <h1>{`Let me re-iterate ...`}</h1>
  55 | <p>{`for i in 1 .. 10 `}
> 56 | {do-something(i)}</p>
     |  ^
  57 | <p>{`As you probably guessed, indented 4 spaces. By the way, instead of
  58 | indenting the block, you can use delimited blocks, if you like:`}</p>
  59 | <pre><code  {...{"parentName":"pre"}}>{`define foobar() {

Add @babel/plugin-proposal-do-expressions (https://git.io/vb4S3) to the 'plugins' section of your Babel config to enable transformation.
If you want to leave it as-is, add @babel/plugin-syntax-do-expressions (https://git.io/vb4yh) to the 'plugins' section to enable parsing..../document-site/content/introduction.mdx

I don't know why it's showing 56:2 as the source of error, while, the actual error is caused by content\introduction.mdx at line 39:

    # Let me re-iterate ...
    for i in 1 .. 10 { do-something(i) }

Removing that part, removes the error too, but, code highlighting stops working. First I thought, it was because of something that I changed, but, then, I tried creating another project from scratch and still the same. Can this please be checked?

@hrishikesh-k
Copy link
Author

@ChangoMan Sorry to bother you sir, but, it'd be nice to get this theme working as it's not serving any purpose by not working.

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

1 participant