Cannot read properties of null (reading 'emitsOptions')
Vue version
3.2.25
Link to minimal reproduction
Steps to reproduce
When i comment out line 12, open line 13, the error appears!
What is expected?
No error.
What is actually happening?
Has error.
System Info
No response
Any additional comments?
Please fixed it.
Do NOT at people like this. If someone has the bandwidth to handle this issue, they will.
Just came across the same error message in a bunch of basically different use cases. AFAICT, this particular issue is just a follow up to some other issue which is causing Vue to throw in a wrong moment such as the set up of a component in my case.
I was observing it several times within the last two hours due to some race conditions when a component's template is trying to de-reference something that hasn't been set, yet.
When looking into your code, there is a Vue warning regarding the fact that the Teleport target is null. As soon as you prevent the Teleport from being applied prior to having some actual target, the error is gone as you've mentioned in your post, too.
So, preferring Vue to not throw might be eligible, though it might just slow it down for no permanent benefit. And there is a warning you shouldn't ignore. It's there for a reason, I guess.