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.

regeneratorRuntime is not defined in build output

See original GitHub issue

Attempting packemon for a project. Its building the project fast without errors. But the output contains references to regeneratorRuntime which is not in scope. Checking this SO question it says the @babel/plugin-transform-runtime plugin should be used… but I am not sure how to add that as packemon uses its internal babel configuration? Is there a way to extend it / add a plugin for it?

You can reproduce it by cloning the fix-web-api-issues branch here. Running node lib/bin.js should not throw.

Thanks 😁

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
milesjcommented, Jan 25, 2021

Awesome, glad to hear!

1reaction
milesjcommented, Jan 16, 2021

I’ll look into the node polyfills piece.

As for the runtime, you would need to add the @babel/runtime dep to your project, since it requires it. https://packemon.dev/docs/setup#transforming-generators

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 >
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 >
Babel 6 regeneratorRuntime is not defined - Stack Overflow
When using webpack-dev-server with HMR, doing this reduced the number of files it has to compile on every build by quite a lot....
Read more >
T286846 ReferenceError: regeneratorRuntime is not defined
34, [Chrome 90.0.4430.93 linux #0-0] regeneratorRuntime is not defined ... (ack is a command line search tool. ack -cl regeneratorRuntime will output how ......
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 >

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