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

969
Vistas
TypeError: require.requireActual is not a function

I'm getting an error on my Jest tests:

 FAIL  test/storyshots.test.ts
  ● Test suite failed to run

    TypeError: require.requireActual is not a function

      1 | import initStoryshots from "@storybook/addon-storyshots"
      2 | 
    > 3 | initStoryshots({
        | ^
      4 |   configPath: "./storybook",
      5 |   framework: "react-native",
      6 | })

      at Object.load (node_modules/@storybook/addon-storyshots/dist/frameworks/react-native/loader.js:23:29)
      at Object.loadFramework [as default] (node_modules/@storybook/addon-storyshots/dist/frameworks/frameworkLoader.js:26:19)
      at testStorySnapshots (node_modules/@storybook/addon-storyshots/dist/api/index.js:48:14)
      at Object.<anonymous> (test/storyshots.test.ts:3:1)

I'm not using requireActual anywhere in my code. It looks like Storybook does, though.

A Google search turned up only one (since deleted) Stackoverflow question with no answer.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Jest deprecated require.requireActual a while back and recently removed it in version 26.

Downgrade to Jest 25 to fix it, or find what package is using require.requireActual and have them use jest.requireActual instead.

EDIT: Storybook v6.0.0-beta.3 includes an update that adds Jest v26 support.

over 4 years ago · Santiago Trujillo Denunciar
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