Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

310
Views
ReferenceError: regeneratorRuntime is not defined in create-react-app

Currently trying some testing using Jest for the first time on a create-react-app project:

import { render, cleanup } from "@testing-library/react";
import React from "react";
import CarouselItem from "./carousel-item.component";

afterEach(cleanup);

describe("<carousel-item.test />", () => {
    const defaultProps = {};
    const element = render(<CarouselItem {...defaultProps} />);

    test("render", () => {
        expect(element).toMatchSnapshot();
    });
});

But I've been receiving this error when running the test:

ReferenceError: regeneratorRuntime is not defined

      40 |      }, [$title, genreIDs]);
      41 |
    > 42 |      const getInfo = async (id) => {
         |                   ^
      43 |              // get additional title data
      44 |              try {

I have seen a few different answers but none of them pertain specifically to create-react-app projects so I wanted to double check.

Should I just install regenerator-runtime and import it into every file using an async function? The CRA docs and other answers I've seen give the impression that this sort of thing should be polyfilled automatically when using CRA, am I doing something wrong?

TIA

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!