Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught NetworkError for cron-parser #125

Open
qmn1711 opened this issue Aug 10, 2022 · 0 comments
Open

Uncaught NetworkError for cron-parser #125

qmn1711 opened this issue Aug 10, 2022 · 0 comments
Assignees
Labels
bug Something isn't working to inspect 🤔

Comments

@qmn1711
Copy link

qmn1711 commented Aug 10, 2022

I want to use cron-parser in my worker but useWorker can't load it, even with the example code like this:

const [sortWorker] = useWorker(sortNumbers, {
  remoteDependencies: [
    'https://cdn.jsdelivr.net/npm/cron-parser@4.6.0/lib/parser.min.js',
  ],
});

Message of ErrorEvent:
Uncaught NetworkError: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'https://cdn.jsdelivr.net/npm/cron-parser@4.6.0/lib/parser.min.js' failed to load."

I can run successfully with the remoteDependencies example. I'm not sure whether it's problem of useWorker or cron-parser bundling.

@qmn1711 qmn1711 added the bug Something isn't working label Aug 10, 2022
@alewin alewin moved this to Todo in useWorker TODOs Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working to inspect 🤔
Projects
Status: Todo
Development

No branches or pull requests

3 participants