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

416
Views
Client-side import map unable to locate module (error 404)

I'm attempting to import a module in vanilla JS in the browser (no bundler).

The module is worker-timers (https://github.com/chrisguttandin/worker-timers), which I installed into the same directory as my index.html via npm install.

But I get multiple 404 errors, like GET http://127.0.0.1:3000/node_modules/worker-timers/build/es2019/factories/load-worker-timers net::ERR_ABORTED 404 (Not Found)

My minimal code is below.

<body>
    <script type="importmap">
{ "imports": {
  "worker-timers":        "./node_modules/worker-timers/build/es2019/module.js",
  "worker-timers-broker": "./node_modules/worker-timers-broker/build/es2019/module.js",
  "worker-timers-worker": "./node_modules/worker-timers-worker/build/es2019/module.js"
} }
</script>
    <script type="module">
        import * as workerTimers from 'worker-timers';
        console.log(workerTimers);
    </script>
</body>

What am I doing wrong?

Or, I'm happy to import them any way that works, if there's an alternative.

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!