question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

loader worker-plugin/loader is not found by webpack

See original GitHub issue

Using worker-plugin version 4.0.2, and trying to use the worker-plugin/loader syntax, I get the following error in Webpack:

ERROR in /home/steph/data/enlightware/game-creator/src/blocks/actions/music/music.ts
./src/blocks/actions/music/music.ts
[tsl] ERROR in /home/steph/data/enlightware/game-creator/src/blocks/actions/music/music.ts(18,29)
      TS2307: Cannot find module 'worker-plugin/loader!./music.worklet'.

is the line:

import musicWorkletURL from 'worker-plugin/loader!./music.worklet';

The file music.ts imports the worker music.worklet.ts.

I am using Webpack 4.42 and Typescript 3.8.3 (both latest).

While my configuration files have nothing exotic IMHO, I am aware that this problem still is likely the result of a complex interaction between Webpack and Typescript, and I will produce a minimal test case as soon as possible. I still post the issue already in case someone else meets the same problem.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:9

github_iconTop GitHub Comments

3reactions
developitcommented, May 6, 2020

I think I know what is causing the crash, will try to reproduce so I can add a fix.

2reactions
hunyoboycommented, May 6, 2020

I’m still experiencing this crash issue. Using the webpack configuration and doing the direct import of worker file. I’m using latest 4.0.3.

Read more comments on GitHub >

github_iconTop Results From Across the Web

worker-loader - webpack - JS.ORG
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >
Module not found error when adding worker-loader
I am working on my vue app and I am trying to add worker-loader. These are the stops I have followed. I added...
Read more >
worker-plugin - npm
Automatically bundle & compile Web Workers within Webpack. Features. Automatically compiles modules loaded in Web Workers: const worker = new ...
Read more >
Loading web workers using Webpack 5 · mmazzarolo.com
Web workers are restricted by a same-origin policy, so if your webpack assets are not being served from the same origin as your...
Read more >
Aurelia Webpack with Typescript Module: Module not found
Hi. I followed the instruction for the Typescript WebWorker integration for Webpack here: GitHub - webpack-contrib/worker-loader: A webpack ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found