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.

imported lodash functions not working in the worker function

See original GitHub issue

When I run a function which uses imported lodash functions, I get an error:

Uncaught ReferenceError: __WEBPACK_IMPORTED_MODULE_10_lodash___default is not defined

Is there a workaround for this, or imported modules cannot be used in the function that are sent to the worker?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:15
  • Comments:7

github_iconTop GitHub Comments

4reactions
rconstantinecommented, Nov 14, 2018

Doesn’t look like the author answers questions. Perhaps this is abandonware?

0reactions
chinh2597commented, Jun 7, 2021

inside worker use importScripts instead of import

Read more comments on GitHub >

github_iconTop Results From Across the Web

Local functions not working in VueUse useWebWorkerFn
I'm trying to filter an array of objects using useWebWorkerFn The following is my code to do the same import { useWebWorkerFn }...
Read more >
The Correct Way to Import Lodash Libraries: A Benchmark
Importing Lodash libraries doesn't need to be daunting. Get insights into the top three ways to import Lodash functions.
Read more >
Importing Lodash as a Script Include - ServiceNow Community
Hello all, I was inspired by this video to try and import lodash into ServiceNow as a script include. I was able to...
Read more >
Lodash _.orderBy() Method - GeeksforGeeks
Lodash helps in working with arrays, collection, strings, ... const _ = require('lodash') is used to import the lodash library in the file....
Read more >
New job has me looking at Lodash more critically. Wondering ...
At my work we use this plugin to ensure that only lodash functions that don't have native equivalents are imported and it's saved...
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