You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since upgrading to the latest Storybook version (6.5.9), I noticed multiple (console) errors in my stories which I suspect to cause other problems in my Storybook app as well. When a component calls emit() on an EventEmitter, it says that the emitter is not a function. This doesn't occur with every emitter though. Most of them still work and I don't see a pattern. The error listed below occurs in a lot of my stories now and I just can't figure out why. Is this a known issue?
Angular Version: 13.1.3
Storybook Version: 6.5.9
ERROR TypeError ctx.eventEmitter is not a function
ERROR TypeError: ctx.formDataChanged is not a function
at StorybookWrapperComponent_Template_form_formDataChanged_0_listener (template.html:1:344)
at executeListenerWithErrorHandling (core.mjs:14974:1)
at Object.wrapListenerIn_markDirtyAndPreventDefault [as next] (core.mjs:15012:1)
at SafeSubscriber.__tryOrUnsub (Subscriber.js:183:1)
at SafeSubscriber.next (Subscriber.js:122:1)
at Subscriber._next (Subscriber.js:72:1)
at Subscriber.next (Subscriber.js:49:1)
at EventEmitter_.next (Subject.js:39:1)
at EventEmitter_.emit (core.mjs:22430:1)
at FormComponent.<anonymous> (our-project.mjs:7382:1)
I also get the following warning: Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot
I had to upgrade to the newer version because the previous version couldn't identify all of my components @Input()s.
The text was updated successfully, but these errors were encountered:
Okay thanks, I get it now. Based on the comments I've read, the solution of removing the explicit type definition of the EventEmitters provided by @yngvebn worked for me.
This is the RegEx I used to replace all of my Emitters at once: : EventEmitter<(.*)> = new EventEmitter<(.*)>\(\); = new EventEmitter<$1>();
Hello!
Since upgrading to the latest Storybook version (6.5.9), I noticed multiple (console) errors in my stories which I suspect to cause other problems in my Storybook app as well. When a component calls
emit()
on anEventEmitter
, it says that the emitter is not a function. This doesn't occur with every emitter though. Most of them still work and I don't see a pattern. The error listed below occurs in a lot of my stories now and I just can't figure out why. Is this a known issue?Angular Version: 13.1.3
Storybook Version: 6.5.9
ERROR TypeError ctx.eventEmitter is not a function
I also get the following warning:
Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot
I had to upgrade to the newer version because the previous version couldn't identify all of my components
@Input()
s.The text was updated successfully, but these errors were encountered: