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

399
Vistas
TestCafe: ReferenceError: Cannot access 'ModuleName' before initialization

Im using testcafe for testing our page for now bout 1 year. On the latest version of our page, the devs used preloading and critical CSS for performance optimizations.

Since then i get an error on page startup:

ReferenceError: Cannot access 'ModuleName' before initialization

Is there a problem with TestCafe if a a page uses rel="modulepreload" to import js?

The DOM shows, that this module is part of a js-file that is preloaded like this. <link href="//cdn.test.local/version1/dist/script/something.static.js" rel="modulepreload">

-> link wont work since the page is on a local site.

Content of js-file: import{ModuleName}from'./classes/something.class.ajax.js';export const someAjaxPlugin=new ModuleName;

This Error does only occur if i run the page in testcafe... is that a bug? Any one an idea what i can do so my tests will run again?

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