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-plugin-mdx JSON5 invalid end of input #20231

Closed
sh0rez opened this issue Dec 19, 2019 · 1 comment
Closed

gatsby-plugin-mdx JSON5 invalid end of input #20231

sh0rez opened this issue Dec 19, 2019 · 1 comment

Comments

@sh0rez
Copy link

sh0rez commented Dec 19, 2019

Description

Trying to build my gatbsy-docz project, sporadically fails with this error message:

10:49:16 PM: $ gatsby build
10:49:19 PM: warning Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
10:49:19 PM: success open and validate gatsby-configs - 1.271s
10:49:20 PM: success load plugins - 0.394s
10:49:20 PM: success onPreInit - 0.001s
10:49:20 PM: success delete html and css files from previous builds - 0.012s
10:49:20 PM: success initialize cache - 0.007s
10:49:20 PM: success copy gatsby files - 0.030s
10:49:21 PM: success onPreBootstrap - 0.906s
10:49:21 PM: success createSchemaCustomization - 0.001s
10:49:21 PM: warning Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
10:49:26 PM: error "gatsby-plugin-mdx" threw an error while running the onCreateNode lifecycle:
10:49:26 PM: JSON5: invalid end of input at 1:1
10:49:26 PM: 
10:49:26 PM:   SyntaxError: JSON5: invalid end of input at 1:1
10:49:26 PM:   
10:49:26 PM:   - parse.js:1083 syntaxError
10:49:26 PM:     [docs]/[json5]/lib/parse.js:1083:17
10:49:26 PM:   
10:49:26 PM:   - parse.js:1032 invalidEOF
10:49:26 PM:     [docs]/[json5]/lib/parse.js:1032:12
10:49:26 PM:   
10:49:26 PM:   - parse.js:821 Object.start
10:49:26 PM:     [docs]/[json5]/lib/parse.js:821:19
10:49:26 PM:   
10:49:26 PM:   - parse.js:32 Object.parse
10:49:26 PM:     [docs]/[json5]/lib/parse.js:32:32
10:49:26 PM:   
10:49:26 PM:   - utils.js:78 requireJson
10:49:26 PM:     [docs]/[gatsby-remark-vscode]/src/utils.js:78:71
10:49:26 PM:   
10:49:26 PM:   - processExtension.js:6 processExtension
10:49:26 PM:     [docs]/[gatsby-remark-vscode]/src/processExtension.js:6:23
10:49:26 PM:   
10:49:26 PM:   - downloadExtension.js:30 syncExtensionData
10:49:26 PM:     [docs]/[gatsby-remark-vscode]/src/downloadExtension.js:30:38
10:49:26 PM:   
10:49:26 PM:   - downloadExtension.js:57 downloadExtension
10:49:26 PM:     [docs]/[gatsby-remark-vscode]/src/downloadExtension.js:57:9

Steps to reproduce

See this pull request: grafana/tanka#134, that's my source.

Basically gatsby, invoked using yarn build,

A failed CI build: https://app.netlify.com/sites/tanka/deploys/5dfbf0033d0e2c0008617c89

Expected result

It works everytime, or fails everytime

Actual result

It fails sometimes with above error message

Environment

  System:
    OS: Linux 5.4 Arch Linux
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 13.3.0 - /usr/bin/node
    Yarn: 1.21.1 - /usr/bin/yarn
    npm: 6.12.1 - /usr/bin/npm
  Languages:
    Python: 3.8.0 - /usr/bin/python
  Browsers:
    Firefox: 71.0
  npmPackages:
    gatsby: ^2.18.12 => 2.18.12 
    gatsby-image: ^2.2.34 => 2.2.34 
    gatsby-remark-vscode: ^1.4.0 => 1.4.0 
    gatsby-theme-docz: ^2.3.0-alpha.5 => 2.3.0-alpha.5 
  npmGlobalPackages:
    gatsby-cli: 2.8.13
@sh0rez
Copy link
Author

sh0rez commented Dec 22, 2019

Not related to gatsby-plugin-mdx at all, this was failing because of vscode marketplace rate limiting experienced by the gatsby-remark-vscode plugin

@sh0rez sh0rez closed this as completed Dec 22, 2019
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