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.

Unhandled Rejection (ReferenceError): regeneratorRuntime is not defined

See original GitHub issue

Library versions

  • react-aad-msal: 2.3.5
  • msal: 1.3.1

Describe the bug Unhandled Rejection (ReferenceError): regeneratorRuntime is not defined After upgrade npm package from 2.1.1 on a react app

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
henriktorgetcommented, Jun 30, 2020

I solved this by adding: import "regenerator-runtime/runtime" in my authProvider.js

0reactions
kiranbhadanicommented, May 27, 2020

@AndrewCraswell Not sure how to apply ‘polyfill’, I managed to upgrade the package by installing all npm dependencies (copying from sample app) and importing regenerator-runtime

Dependencies add to package.json “velocity-animate”: “^1.5.2”, “@babel/core”: “7.8.4”, “@svgr/webpack”: “4.3.3”, “@testing-library/jest-dom”: “^4.2.4”, “@testing-library/react”: “^9.3.2”, “@testing-library/user-event”: “^7.1.2”, “@typescript-eslint/eslint-plugin”: “^2.10.0”, “@typescript-eslint/parser”: “^2.10.0”, “babel-eslint”: “10.0.3”, “babel-jest”: “^24.9.0”, “babel-loader”: “8.0.6”, “babel-plugin-named-asset-import”: “^0.3.6”, “babel-preset-react-app”: “^9.1.1”, “camelcase”: “^5.3.1”, “case-sensitive-paths-webpack-plugin”: “2.3.0”, “css-loader”: “3.4.2”, “dotenv”: “8.2.0”, “dotenv-expand”: “5.1.0”, “eslint”: “^6.6.0”, “eslint-config-react-app”: “^5.2.0”, “eslint-loader”: “3.0.3”, “eslint-plugin-flowtype”: “4.6.0”, “eslint-plugin-import”: “2.20.0”, “eslint-plugin-jsx-a11y”: “6.2.3”, “eslint-plugin-react”: “7.18.0”, “eslint-plugin-react-hooks”: “^1.6.1”, “file-loader”: “4.3.0”, “fs-extra”: “^8.1.0”, “html-webpack-plugin”: “4.0.0-beta.11”, “identity-obj-proxy”: “3.0.0”, “jest”: “24.9.0”, “jest-environment-jsdom-fourteen”: “1.0.1”, “jest-resolve”: “24.9.0”, “jest-watch-typeahead”: “0.4.2”, “mini-css-extract-plugin”: “0.9.0”, “optimize-css-assets-webpack-plugin”: “5.0.3”, “pnp-webpack-plugin”: “1.6.0”, “postcss-flexbugs-fixes”: “4.1.0”, “postcss-loader”: “3.0.0”, “postcss-normalize”: “8.0.1”, “postcss-preset-env”: “6.7.0”, “postcss-safe-parser”: “4.0.1”, “react-app-polyfill”: “^1.0.6”, “react-dev-utils”: “^10.2.0”, “react-redux”: “^7.1.3”, “redux”: “^4.0.5”, “resolve”: “1.15.0”, “resolve-url-loader”: “3.1.1”, “sass-loader”: “8.0.2”, “semver”: “6.3.0”, “style-loader”: “0.23.1”, “terser-webpack-plugin”: “2.3.4”, “ts-pnp”: “1.1.5”, “url-loader”: “2.3.0”, “webpack”: “4.41.5”, “webpack-dev-server”: “3.10.2”, “webpack-manifest-plugin”: “2.2.0”, “workbox-webpack-plugin”: “4.3.1”

import regenerator-runtime in index.js import ‘regenerator-runtime/runtime’

Can you confirm that is that correct way, do i need all these dependecies?

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 >
'regeneratorRuntime' is not defined Code Example
react ReferenceError: regeneratorRuntime is not defined ; 1. // yarn add @babel/plugin-transform-runtime --dev ; 2. // yarn add @babel/runtime ; 3. ​ ;...
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