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

Unknown option: .reactRuntime #26736

Closed
michaelpumo opened this issue Sep 1, 2020 · 26 comments · Fixed by prismicio/gatsby-source-graphql-universal#12
Closed

Unknown option: .reactRuntime #26736

michaelpumo opened this issue Sep 1, 2020 · 26 comments · Fixed by prismicio/gatsby-source-graphql-universal#12
Assignees
Labels
type: bug An issue or pull request relating to a bug in Gatsby type: upstream Issues outside of Gatsby's control, caused by dependencies

Comments

@michaelpumo
Copy link

Description

Running gatsby develop results in 2 errors stating: "Unknown option: .reactRuntime"

It might be something to do with images, as I noticed the errors crop up just after the console statement: "Generating image thumbnails"...

success createPages - 16.044s
success Checking for changed pages - 0.002s
success createPagesStatefully - 0.102s
success update schema - 0.116s
success write out redirect data - 0.002s
success Build manifest and related icons - 0.117s
success onPostBootstrap - 0.127s
info bootstrap finished - 77.267s
success onPreExtractQueries - 0.003s
success extract queries from components - 0.406s
success write out requires - 0.046s
success run static queries - 0.212s - 1/1 4.72/s
success run page queries - 1.786s - 1679/1679 940.12/s
success Generating image thumbnails - 4.130s - 6/6 1.45/s

 ERROR #98123  WEBPACK

Generating development JavaScript bundle failed

Unknown option: .reactRuntime. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.

File: .cache/polyfill-entry.js


 ERROR #98123  WEBPACK

Generating development JavaScript bundle failed

Unknown option: .reactRuntime. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.

File: .cache/app.js

failed Building development bundle - 0.747s

Steps to reproduce

Install the dependencies as shown and the same errors should occur.

Expected result

Project should build successfully.

Actual result

ERROR #98123  WEBPACK

Generating development JavaScript bundle failed

Unknown option: .reactRuntime. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.

File: .cache/app.js


 ERROR #98123  WEBPACK

Generating development JavaScript bundle failed

Unknown option: .reactRuntime. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.

File: .cache/polyfill-entry.js

Environment

  System:
    OS: macOS 10.15.5
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.18.3 - /usr/local/bin/node
    Yarn: 1.21.1 - /usr/local/bin/yarn
    npm: 6.14.6 - /usr/local/bin/npm
  Languages:
    Python: 2.7.16 - /usr/bin/python
  Browsers:
    Chrome: 84.0.4147.135
    Firefox: 78.0.2
    Safari: 13.1.1
  npmPackages:
    gatsby: ^2.24.53 => 2.24.53
    gatsby-image: ^2.4.16 => 2.4.16
    gatsby-plugin-manifest: ^2.4.27 => 2.4.27
    gatsby-plugin-offline: ^3.2.26 => 3.2.26
    gatsby-plugin-react-helmet: ^3.3.10 => 3.3.10
    gatsby-plugin-sharp: ^2.6.31 => 2.6.31
    gatsby-plugin-styled-components: ^3.3.10 => 3.3.10
    gatsby-source-fetch: ^1.0.3 => 1.0.3
    gatsby-source-filesystem: ^2.3.27 => 2.3.27
    gatsby-source-graphql-universal: 3.3.0 => 3.3.0
    gatsby-source-prismic-graphql: ^3.6.2 => 3.6.2
    gatsby-transformer-csv: ^2.3.10 => 2.3.10
    gatsby-transformer-sharp: ^2.5.14 => 2.5.14
  npmGlobalPackages:
    gatsby-cli: 2.12.88
@michaelpumo michaelpumo added the type: bug An issue or pull request relating to a bug in Gatsby label Sep 1, 2020
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Sep 1, 2020
@michaelpumo
Copy link
Author

I since locked the Gatsby version to "gatsby": "2.24.51" in my package.json and re-installed. That appears to have resolved the issue, so it must be something with version "gatsby": "2.24.53" (I didn't test the version between these two).

@hs737
Copy link

hs737 commented Sep 1, 2020

Agreed. I've been having the same issue for a few days. I'm adding my gatsby info in case it's at all helpful. My guess is that this issue might be related to #26652


  System:
    OS: macOS Mojave 10.14.6
    CPU: (8) x64 Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 13.11.0 - ~/.nvm/versions/node/v13.11.0/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.7 - ~/.nvm/versions/node/v13.11.0/bin/npm
  Languages:
    Python: 2.7.14 - /usr/local/bin/python
  Browsers:
    Chrome: 84.0.4147.105
    Firefox: 80.0
    Safari: 13.1.2
  npmPackages:
    gatsby: ^2.24.50 => 2.24.53 
    gatsby-image: ^2.3.1 => 2.4.16 
    gatsby-plugin-facebook-pixel: ^1.0.3 => 1.0.3 
    gatsby-plugin-google-analytics: ^2.3.0 => 2.3.13 
    gatsby-plugin-launchdarkly: ^0.3.2 => 0.3.2 
    gatsby-plugin-manifest: ^2.3.3 => 2.4.27 
    gatsby-plugin-mdx: ^1.1.11 => 1.2.37 
    gatsby-plugin-mixpanel: ^3.1.6 => 3.1.7 
    gatsby-plugin-offline: ^3.1.2 => 3.2.26 
    gatsby-plugin-react-helmet: ^3.2.1 => 3.3.10 
    gatsby-plugin-sass: ^2.2.1 => 2.3.12 
    gatsby-plugin-sentry: ^1.0.1 => 1.0.1 
    gatsby-plugin-sharp: ^2.6.0 => 2.6.31 
    gatsby-plugin-sitemap: ^2.4.5 => 2.4.12 
    gatsby-plugin-splitio: ^0.1.1 => 0.1.1 
    gatsby-plugin-typescript: ^2.4.0 => 2.4.18 
    gatsby-prismic-pagination: ^0.2.1 => 0.2.1 
    gatsby-remark-images: ^3.3.0 => 3.3.28 
    gatsby-source-filesystem: ^2.2.2 => 2.3.27 
    gatsby-source-graphql-universal: 3.3.0 => 3.3.0 
    gatsby-source-prismic-graphql: ^3.6.2 => 3.6.2 
    gatsby-transformer-remark: ^2.8.4 => 2.8.32 
    gatsby-transformer-sharp: ^2.4.3 => 2.5.14 

@madalynrose
Copy link
Contributor

Hi @michaelpumo and @hs737!

Sorry to hear you're running into an issue. To help us best begin debugging the underlying cause, it is incredibly helpful if you're able to create a minimal reproduction. This is a simplified example of the issue that makes it clear and obvious what the issue is and how we can begin to debug it.

If you're up for it, we'd very much appreciate if you could provide a minimal reproduction either in a public repo or in something like codesandbox and we'll be able to take another look.

Thanks for using Gatsby! 💜

@madalynrose madalynrose added status: needs reproduction This issue needs a simplified reproduction of the bug for further troubleshooting. topic: webpack/babel Webpack or babel and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Sep 1, 2020
@danniing
Copy link

danniing commented Sep 3, 2020

I'm having the same issue. Just created this new project. I'm using "gatsby-source-prismic-graphql" just like the two above.

System:
    OS: macOS 10.15.6
    CPU: (8) x64 Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 12.18.2 - /usr/local/bin/node
    Yarn: 1.22.5 - /usr/local/bin/yarn
    npm: 6.14.8 - /usr/local/bin/npm
  Languages:
    Python: 2.7.16 - /usr/bin/python
  Browsers:
    Chrome: 85.0.4183.83
    Firefox: 72.0.2
    Safari: 13.1.2
  npmPackages:
    gatsby: ^2.24.49 => 2.24.53
    gatsby-image: ^2.4.16 => 2.4.16
    gatsby-plugin-manifest: ^2.4.27 => 2.4.27
    gatsby-plugin-preact: ^4.0.10 => 4.0.10
    gatsby-plugin-react-helmet: ^3.3.10 => 3.3.10
    gatsby-plugin-sharp: ^2.6.31 => 2.6.31
    gatsby-plugin-sitemap: ^2.4.12 => 2.4.12
    gatsby-plugin-webfonts: ^1.1.3 => 1.1.3
    gatsby-source-filesystem: ^2.3.27 => 2.3.27
    gatsby-source-prismic-graphql: ^3.6.2 => 3.6.2
    gatsby-transformer-sharp: ^2.5.14 => 2.5.14
  npmGlobalPackages:
    gatsby: 2.24.53

@danniing
Copy link

danniing commented Sep 3, 2020

I since locked the Gatsby version to "gatsby": "2.24.51" in my package.json and re-installed. That appears to have resolved the issue, so it must be something with version "gatsby": "2.24.53" (I didn't test the version between these two).

Worked for me too

@nickmcmillan
Copy link

Same issue here with "gatsby": "2.24.53"
In my case the error was happening in the Gatsby Cloud build process;

error Generating JavaScript bundles failed Unknown option: .reactRuntime. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options. error Generating JavaScript bundles failed Unknown option: .reactRuntime. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options

Stepping back to an older version of the gatsby package resolved the issue.

@michaelpumo
Copy link
Author

Hi @michaelpumo and @hs737!

Sorry to hear you're running into an issue. To help us best begin debugging the underlying cause, it is incredibly helpful if you're able to create a minimal reproduction. This is a simplified example of the issue that makes it clear and obvious what the issue is and how we can begin to debug it.

If you're up for it, we'd very much appreciate if you could provide a minimal reproduction either in a public repo or in something like codesandbox and we'll be able to take another look.

Thanks for using Gatsby! 💜

I tried setting up a test case and failed because I couldn't work out how to correctly use Codesandbox. I'll give it another go soon.

@kamerondotcom
Copy link

kamerondotcom commented Sep 4, 2020

Happening for me too and I've tried downgrading to Gatsby @ 2.24.51

System:
OS: macOS 10.15.6
CPU: (8) x64 Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.16.0 - /usr/local/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Languages:
Python: 2.7.16 - /usr/bin/python
Browsers:
Chrome: 85.0.4183.83
Firefox: 72.0.2
Safari: 13.1.2
npmPackages:
gatsby: ^2.24.51 => 2.24.53
gatsby-image: ^2.4.16 => 2.4.16
gatsby-plugin-alias-imports: ^1.0.5 => 1.0.5
gatsby-plugin-env-variables: ^2.0.0 => 2.0.0
gatsby-plugin-google-analytics: ^2.3.13 => 2.3.13
gatsby-plugin-google-fonts: 1.0.1 => 1.0.1
gatsby-plugin-hotjar: ^1.0.1 => 1.0.1
gatsby-plugin-mailchimp: ^5.2.2 => 5.2.2
gatsby-plugin-manifest: ^2.4.27 => 2.4.27
gatsby-plugin-netlify-functions: 0.0.3 => 0.0.3
gatsby-plugin-offline: ^3.2.26 => 3.2.26
gatsby-plugin-postcss: ^2.3.11 => 2.3.11
gatsby-plugin-react-helmet: ^3.3.10 => 3.3.10
gatsby-plugin-react-svg: ^3.0.0 => 3.0.0
gatsby-plugin-robots-txt: ^1.5.1 => 1.5.1
gatsby-plugin-sass: ^2.3.12 => 2.3.12
gatsby-plugin-sharp: 2.6.31 => 2.6.31
gatsby-plugin-shopify-buy: 0.0.2 => 0.0.2
gatsby-plugin-sitemap: ^2.4.12 => 2.4.12
gatsby-source-filesystem: ^2.3.27 => 2.3.27
gatsby-source-prismic-graphql: github:prismicio/gatsby-source-prismic-graphql#flat => 3.6.2
gatsby-source-shopify2: ^2.0.7 => 2.0.7
gatsby-transformer-sharp: ^2.5.14 => 2.5.14
npmGlobalPackages:
gatsby-cli: 2.7.44

@wardpeet
Copy link
Contributor

wardpeet commented Sep 7, 2020

Can you try removing node_modules & your lock file? and install again? I'll see if I can find a fix for it but that should do the trick.

@michaelpumo
Copy link
Author

Can you try removing node_modules & your lock file? and install again? I'll see if I can find a fix for it but that should do the trick.

I've tried that several times to no luck...which is actually how I figured out it was that specific version of Gatsby with the issue.

@wardpeet
Copy link
Contributor

wardpeet commented Sep 7, 2020

Do you by any chance have a custom babelrc file? @michaelpumo

@michaelpumo
Copy link
Author

michaelpumo commented Sep 7, 2020

Do you by any chance have a custom babelrc file? @michaelpumo

I do not, no. I tried setting one up later to try and circumvent the unknown option but that didn't work out either.

@wardpeet
Copy link
Contributor

wardpeet commented Sep 7, 2020

I can't seem to reproduce... any chance to share a git repo? Feel free to send it privately to ward@gatsbyjs.com.

@ttstauss
Copy link

ttstauss commented Sep 9, 2020

I also get this error. Tried each suggestion with no luck. Currently investigating.

@Walkeezy
Copy link

Same issue here.

@RomSribn
Copy link

I faced the same issue today.

@veebid
Copy link

veebid commented Sep 11, 2020

Same problem

`
ERROR #98123 WEBPACK

Generating development JavaScript bundle failed

Unknown option: .reactRuntime. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.

File: .cache/polyfill-entry.js

ERROR #98123 WEBPACK

Generating development JavaScript bundle failed

Unknown option: .reactRuntime. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.

File: .cache/app.js

failed Building development bundle - 2.336s`

@PierreAndreis
Copy link

Having this issue as well. This might be related to gatsby-source-prismic-graphql messing with the babel file to get their preview working.

@kamerondotcom
Copy link

Any updates here? Haven't been able to build for close to a week now. Help.

@codeAdrian
Copy link

codeAdrian commented Sep 15, 2020

Same issue here. Downgrading it to "gatsby": "2.24.51" fixes it temporarily

@LekoArts
Copy link
Contributor

We can't give any updates without a clear reproduction, so if you can provide that please do. Thanks!

@j-mcgregor
Copy link

j-mcgregor commented Sep 15, 2020

Same issue here. Downgrading it to "gatsby": "2.24.51" fixes it temporarily

Unfortunately this isn't working for me. Current versions:

    // package.json
    "@prismicio/gatsby-source-prismic-graphql": "^3.6.13",
    ...
    "gatsby": "^2.24.51",

image

It builds up to here and then hangs...

@wardpeet
Copy link
Contributor

Thanks @michaelpumo for the reproduction. I made a PR prismicio/gatsby-source-graphql-universal#12.

However prismic suggests using https://github.com/angeloashmore/gatsby-source-prismic from reading https://prismic.io/blog/gatsby-prismic-plugins

@wardpeet wardpeet added type: upstream Issues outside of Gatsby's control, caused by dependencies and removed status: needs reproduction This issue needs a simplified reproduction of the bug for further troubleshooting. topic: webpack/babel Webpack or babel labels Sep 16, 2020
@wardpeet
Copy link
Contributor

I'm going to close this issue as there is nothing more to do from our side. I've created an issue prismicio/gatsby-source-graphql-universal#13 so please move the discussion over there.

Thank you for using Gatsby 💪

@MarcMcIntosh
Copy link

Use gatsby version 2.24.11 :)

@jan-vaclavik
Copy link

Helps for me change gatsby version in package.json

"gatsby": "^2.24.53" => "gatsby": "2.24.51"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug An issue or pull request relating to a bug in Gatsby type: upstream Issues outside of Gatsby's control, caused by dependencies
Projects
None yet