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.

Uncaught ReferenceError: regeneratorRuntime is not defined

See original GitHub issue

Library versions

  • react-aad-msal: 2.3.4
  • msal: 1.2.1

Describe the bug I’ve installed and setup react-aad as per the instructions, but using it breaks my application. When wrapping my application with the AzureAD component:

<AzureAD provider={authProvider} forceLogin={true}>
  <App />
</AzureAD>

I get the error Uncaught ReferenceError: regeneratorRuntime is not defined and React never renders anything. I’ve looked for a cause and solution to this issue, but all I see it suggestions on some babel-related packages that need to be installed, and none of those solutions work for me.

Desktop (please complete the following information):

  • OS: Win10
  • Browser: Chrome 80.0

Additional Info My application was created by generator-teams.

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
don1989commented, Mar 9, 2020

Hey @paddotk - I’ve also run into this issue and went down the babel fixing route but I had no luck. I can’t remember where exactly I found this solution, but I fixed it by including this at the top of my index.tsx file (or index.js if you’re using javascript):

import 'regenerator-runtime/runtime'

Hopefully that works for you.

0reactions
amitvig22commented, Mar 27, 2020

@paddotk - i had a similar requirement and we ended up using the samples for auth Teams has set out currently. Teams is working on a SSO API but it is under developer preview : https://docs.microsoft.com/en-us/microsoftteams/platform/tabs/how-to/authentication/auth-aad-sso

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
I had both my 'polyfill import' and my 'async function' in the same file, however I was using the function syntax that hoists...
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?)
Hey, I was able to fix the issue. What I did was update to the latest version of strapi and create a new...
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