PLEASE help us help you by writing a good post!
- we need to know your netlify site name. Example:
gifted-antelope-58b104.netlify.app
- DNS issues? Tell us the custom domain, tell us the error message! We can’t help if we don’t know your domain.
- Build problems? Link or paste the FULL build log & build settings screenshot
The better the post - the faster the answer.
My app: https://gilded-bonbon-74b9b9.netlify.app/
I was trying to offload the file export functionality (PDF, DOCX, etc.) of my app to a web worker for better performance. I’ve used the Comlink library. The worker works as expected, but the Netlify functions I set up would fail with the error message below(Code 502):
“ReferenceError: Worker is not defined
ReferenceError: Worker is not defined
at file:///Users/AKIDO/Documents/ReactGPT/.netlify/functions-serve/fetchGrammarMistakes/functions/src/utils/workerInstance.ts:9:6
at ModuleJob.run (node:internal/modules/esm/module_job:194:25)”
And the worker logic has nothing to do with the serverless functions that use the Axios library to request the OpenAI API. I don’t know why it tries to access the worker module.
When I comment out the content of the file mentioned in the error message, the execution of the serverless functions goes back to normal.
I could not figure out why. Could any one help?