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.

ReferenceError: regeneratorRuntime is not defined

See original GitHub issue

when click browser refresh button, throw ReferenceError: regeneratorRuntime is not defined

Reproduction

{
  "name": "esm-antd",
  "version": "0.0.0",
  "scripts": {
    "dev": "vite",
    "build": "vite build"
  },
  "dependencies": {
    "@pika/react": "^16.13.1",
    "@pika/react-dom": "^16.13.1"
  },
  "devDependencies": {
    "vite": "^1.0.0-rc.1",
    "vite-plugin-react": "^3.0.0"
  }
}

System Info

  • required vite version: v1.0.0-rc.3
  • required Operating System: OS X
  • required Node version: v14.3.0
  • Optional:
    • yarn version: 1.22.4
    • chrome version: 84.0.4147.135

Other

Maybe it’s the chrome browser update that’s causing the problem. This project worked fine before. And worked fine with Firefox.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
hronrocommented, Aug 25, 2020

It’s probably because one of the library you used (or React Developer Tools uses) transpiled async/await code to es5 using babel, which would finally generate some code depends on regenerator, but regenerator is not included in your bundle.

0reactions
underfincommented, Aug 28, 2020

I tested it for a preset repo with React Developer Tools, but don’ t get any error . Close it for now, we will track it if has a reporduction for this.

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 only works because it no longer transforms async/await and thus no longer needs the regeneratorRuntime and because it's not transformed it will...
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 >
regeneratorRuntime is not defined when running jest test
I got the ReferenceError: regeneratorRuntime is not defined error. Please attach your logs beforehand. ○ Test suite failed to run ReferenceError: ...
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