Are there any examples of using shadow with nodejs and worker_threads?
ok wild. just tried translating the node worker_threads example from their docs using "AI". the result is comically bad for all of the models. gemini is closest but still completely broken
maybe I'll create a proper example
Yeah the AI is not helping with this one
Appreciate it
I feel like I saw an example years ago that required enabling a certain kind of logging on the worker side, to be able to see outputs from the workers. But I could be imagining that
whats unclear about it? shadow is not involved in this. every node target can use this?
morning, we started seeing js syntax errors e.g. missing ) after argument list on our project. They randomly appear but only rarely, after ~hours of working. The only way we could make them go away was with a restart. One change we recently did was add a new :browser target in addition to our existing :esm target. Any ideas on things we should try next time it happens to find the root cause?
in what context does it appear? in what file? during what stage? I mean during compilation or at runtime in the browser?
only have a screenshot my colleague captured of the error last time
ah, I think I see the problem
our two targets are writing to the same :output-dir
that can cause problems I guess, especially if one is :browser and the other one is :esm and share some of the same source files?
yep 100%
would have been my first guess 😉
2 builds writing the same file at the same time will cause this. gotta hit the perfect timing though, which explains the randomly/rarely
ok, good. Thank you!