Did something change with how workers are imported/built?
I have a module that relies on a worker, and imports it like:
import worker from './worker?worker'
Now, when I try to build I get an error:
[vite:worker] Cannot add property 0, object is not extensible
3 Replies
Hi @dmarr. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
I'm sorry, but the knowledge sources provided do not contain any explicit information about recent changes to how workers are imported or built in Nuxt or Vite, nor do they mention the specific error
[vite:worker] Cannot add property 0, object is not extensible
. There are several documents about Vite version updates and some related build issues, but none address this particular problem or mention changes to worker import syntax or handling.
If you are encountering this error after a Vite or Nuxt upgrade, it may be related to a recent change in Vite itself, but the sources do not confirm this. You may want to check the Vite changelog for the version you upgraded to, or search for related issues in the Vite or Nuxt repositories for more details. If you have a minimal reproduction, opening an issue on the relevant repository could help get a more targeted answer.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@139883350096740354> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
I rebuilt lockfile and node_modules and issue was fixed...