demo-angular fails to build: Cannot find module 'nativescript-worker-loader!....'
Eonfuzz opened this issue · 10 comments
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
Facing the same issue for Android
Any opdate on this?
I got around it by not using it "The Webpack way" and instead just creating it manually via:
const worker = new Worker("./worker-script");
Take a look to this answer:
https://stackoverflow.com/a/54546214/4982126
same issue with Vue
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";
Issue tends to be the path.
any updates? I have similar problem and I don't know how to fix it...
me too
I'm also facing the same issue in both platforms