Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

309
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda