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

397
Views
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
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!