NativeScript / worker-loader

36 stars 20 forks source link

demo-angular fails to build: Cannot find module 'nativescript-worker-loader!....' #27

Open Eonfuzz opened 5 years ago

Eonfuzz commented 5 years ago

Full error:

file:///app/worker.service.js:5:23: JS ERROR Error: Could not find module 'nativescript-worker-loader!./workers/typescript.worker'. Computed path '/Users/Eonfuzz/Library/Developer/CoreSimulator/Devices/27BC1C0E-FFE7-4EFE-829A-10D9A18FE2AF/data/Containers/Bundle/Application/076FE98C-5BF4-4C9E-B897-3B1C280490FC/demoangular.app/app/tns_modules/nativescript-worker-loader!./workers/typescript.worker'.

To reproduce: git clone https://github.com/NativeScript/worker-loader cd worker-loader/demo-angular npm i tns run ios

tawsif93 commented 5 years ago

Facing the same issue for Android

masquerade75 commented 5 years ago

Any opdate on this?

Eonfuzz commented 5 years ago

I got around it by not using it "The Webpack way" and instead just creating it manually via: const worker = new Worker("./worker-script");

dpavez14 commented 5 years ago

Take a look to this answer: https://stackoverflow.com/a/54546214/4982126

farfromrefug commented 5 years ago

same issue with Vue

fhackenb commented 5 years ago

I had this issue as well. The problem had to do with typescript not liking my route. I ended up having to make it something like: import * as TsWorker from "nativescript-worker-loader!../../../workers/worker";

anfibiacreativa commented 5 years ago

Issue tends to be the path.

jrkf commented 5 years ago

any updates? I have similar problem and I don't know how to fix it...

jannomeister commented 5 years ago

me too

RajkumarRepo commented 5 years ago

I'm also facing the same issue in both platforms