question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] ReferenceError: regeneratorRuntime is not defined

See original GitHub issue

Overview

This is follow up to https://github.com/nozzle/react-static/issues/1122

A new app is created with react-static create

Steps

  1. create a new RS site - react-static create
  2. choose basic template
  3. cd into the new project
  4. add the react-static-plugin-source-filesystem plugin - yarn add react-static-plugin-source-filesystem
  5. add to the static.config.js as such:
  plugins: [
    [
      'react-static-plugin-source-filesystem',
      {
        location: path.resolve('./src/pages'),
      },
    ],
  ]

Now try yarn start, get error ReferenceError: regeneratorRuntime is not defined

The error references: Error: The following error occurred in the plugin located at "/usr/local/projects/aa_working/Active/rs-test/my-static-site/node_modules/react-static-plugin-source-filesystem/node.api.js"

Thanks 😃

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
tannerlinsleycommented, Jun 17, 2019

<Suspense fallback='...'/> is not a temporary measure. This is required. React Static uses Suspense (and suspense mocking) to generate the pages for your site. Start with the basic template and go from there.

0reactions
maxholmancommented, Jun 13, 2019

I was getting the same Suspense error, and managed to track it down to where the templates are loaded in src/browser/components/Routes.js

React isn’t my expertise, nor react-static, so I just bypassed this by wrapping my <Routes /> with a <Suspense fallback=...> as a temporary measure.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix regeneratorRuntime is not defined?
I have ran into a problem, the error is regeneratorRuntime is not defined while working with React and Parcel bundler.
Read more >
Babel 6 regeneratorRuntime is not defined - Stack Overflow
This error is caused when async/await functions are used without the proper Babel plugins. As of March ...
Read more >
ReferenceError regeneratorRuntime is not defined · Issue #9849
I'm building an SSR template, and when I use @babebl/register and then execute webpack (config), the system reported an error.
Read more >
Parcel, how to fix the `regeneratorRuntime is not defined` error
I run into this problem in a project using Babel as soon as I added an async function, but the problem is the...
Read more >
Blank Admin Page: regeneratorRuntime is not defined (babel?)
we are getting blank admin page and error in browser: Uncaught ReferenceError: regeneratorRuntime is not defined
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found