Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

402
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda