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

182
Views
Creating dynamic WebWorker ( Refused to execute script from because its MIME type ('text/html') )

Have problem with webworker. Have this line for creating:

public dbWorker = new Worker(new URL('./workers/db-worker.worker', import.meta.url), { type: 'module' });

And get an error:

Refused to execute script from 'https://...worker.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

Seems need to add type text/javascript but I'm not sure. Tried something like this, without successful:

// content = './workers/db-worker.worker';

// worker_url = URL.createObjectURL(new Blob([this.content], { type: "text/javascript" }));

// dbWorker = new Worker(this.worker_url, { type: 'module' });
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!