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

Develop failure: ReferenceError: regeneratorRuntime is not defined #1847

Closed
EricSong8612 opened this issue Aug 17, 2017 · 8 comments
Closed

Comments

@EricSong8612
Copy link

when I add gatsby-source-contentful in plugins, I get error:
screen shot 2017-08-17 at 4 03 32 pm
the gatsby-config.js is like:
screen shot 2017-08-17 at 5 01 40 pm

@KyleAMathews
Copy link
Contributor

This issue should be fixed now.

@KyleAMathews
Copy link
Contributor

Update to the latest version.

@whmountains
Copy link

I still have this problem after upgrading to Gatsby v1.8.16. Tried nuking .cache but no change.

I started getting the error when I added an async function to my code. Am I supposed to install the babel runtime or is this a bug in Gatsby?

@pie6k
Copy link

pie6k commented Nov 24, 2017

I've got exactly the same issue as @whmountains . I'm using gatsby with typescript and it happens when I want to use async functions.

@auser
Copy link

auser commented Mar 8, 2018

How did you fix it, @pie6k ?

@pie6k
Copy link

pie6k commented Mar 8, 2018

I didn't. @auser

@Jaikant
Copy link
Contributor

Jaikant commented Mar 8, 2018

I am facing the same error, any suggestions!

Uncaught (in promise) ReferenceError: regeneratorRuntime is not defined
    at Login.js:53
    at Login.js:65
    at Object../src/containers/Login.js (Login.js:102)
    at __webpack_require__ (bootstrap e58e01e5cf6cfda1fba5:555)
    at fn (bootstrap e58e01e5cf6cfda1fba5:86)
    at Object../src/pages/login.js (login.js:1)
    at __webpack_require__ (bootstrap e58e01e5cf6cfda1fba5:555)
    at fn (bootstrap e58e01e5cf6cfda1fba5:86)
    at Object../.cache/sync-requires.js (sync-requires.js:15)
    at __webpack_require__ (bootstrap e58e01e5cf6cfda1fba5:555)

@serby
Copy link

serby commented Mar 13, 2018

@Jaikant Your issue looks like in the browser app you've not included the babel-polyfill or regenerator-runtime

Try adding the below to gatsby-browser.js

exports.onClientEntry = () => {
  require('babel-polyfill')
}

https://www.gatsbyjs.org/docs/browser-apis/

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

7 participants