react: Bug: React DevTools throws ReferenceError: regeneratorRuntime is not defined

React version: 16.3.1

Steps To Reproduce

  1. In the Chrome script debugger, enable “Pause on caught exceptions”
  2. Open React DevTools in a app that doesn’t use babel or webpack
  3. ReferenceError: regeneratorRuntime is not defined

The current behavior

ReferenceError: regeneratorRuntime is not defined

The source of this error seems to be something like this:

try {
  // add if support for Symbol.iterator is present
  __webpack_require__(23)(Yallist);
} catch (er) {}

From chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/react_devtools_backend.js

The expected behavior

No errors are thrown. It’s really annoying when React or it’s tooling is throwing exceptions because it makes me having to step through a lot of noise when I’m debugging my own stuff. If this could be avoided that would be much appreciated.


I get that his might not be fixable and if so, feel free to close but please keep it in mind. Please don’t throw exceptions if you absolutely musn’t.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 19 (8 by maintainers)

Most upvoted comments

well, im getting it now, image

for me its at, injectGlobalHook.js file, chrome-extension://jjeclbmchofefamidmcjnkgaddnpnngm/build/injectGlobalHook.js

module.exports = function (Yallist) {
  Yallist.prototype[Symbol.iterator] = /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
    var walker;

at one place e.stack getting undefined and keep throwing exceptions…

React Developer Tools 4.10.1 (12/4/2020) — still reproducible

Could it be possible to do conditional check on babel internals to avoid try/catch, e.g.

if (regeneratorRuntime && Symbol.iterator) {
  require('Yallist');
}

?