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 ReferenceError: f is not defined #133

Open
monski opened this issue Mar 23, 2023 · 3 comments
Open

Uncaught ReferenceError: f is not defined #133

monski opened this issue Mar 23, 2023 · 3 comments
Assignees
Labels
bug Something isn't working to inspect 🤔

Comments

@monski
Copy link

monski commented Mar 23, 2023

Hello,

Using create-react-app when developing npm start the library works fine. But then when i build it i got this error

Uncaught ReferenceError: f is not defined

heres is the sample code

const processData = (xlsData: string[]): Promise => new Promise((resolve, reject) => {

const arrangeData: ArrangeData[] = [];

xlsData.forEach((data: RowData, forIndex: number, arr: any) => {
...
if (forIndex === arr.length - 1) {
resolve({ arrangeData, groups });
}
});
});

const [processWorkers] = useWorkers(processData);

//on Click
const process = async (): void => {
const { arrangeData, groups } = await processWorkers(data);
....
}`

can you help me with this?

thank you in advance

@monski monski added the bug Something isn't working label Mar 23, 2023
@Isaac96SM
Copy link

I also have this issue, any idea? I'm using webpack@4.44.2

@Arima666
Copy link

Same problem

@BitBrewing
Copy link

Don't use Promise in worker

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

6 participants