Notifications center v0.10.1 TypeError
@dr.really is facing the following:
TypeError: Cannot read properties of null (reading 'notifications')
on the notifications center v0.10.1
Has anyone else encountered that?
@dr.really Can you add anything else that may be relevant to troubleshoot this?11 Replies
I can get some screenshots when I get to work 🙂
Sounds great! Meanwhile, if @Support can help regardless - it would be wonderful!
@dr.really it would be nice if you can provide more context
Currently running in Remix, using
@novu/notifications-center: 0.10.1
When using the useNotifications()
hook, I get the following error:
TypeError: Cannot read properties of null (reading 'notifications')
example code:
hope that helpswhich line does throw it?
apologies just now saw this, it throws it on the
useNotifications
line. Looks like something in the hookcan you please share the stack trace?
yessir, once i get to the office i'll shoot one over to you
sorry that took me longer than I wanted it to take
Looks like the issue is here:
https://github.com/novuhq/novu/blob/cd8d36cbb14c2431db8cdec47dcc40ccc5df20c2/packages/notification-center/src/hooks/use-notifications.hook.ts#L14
GitHub
novu/use-notifications.hook.ts at cd8d36cbb14c2431db8cdec47dcc40ccc...
The open-source notification infrastructure for products. Add a notification center for your React, Vue and Angular apps 🚀 - novu/use-notifications.hook.ts at cd8d36cbb14c2431db8cdec47dcc40ccc5df20...
to me it seems like you are trying to use the
useNotifications
hook outside the NovuProvider
context
can you check that?For some reason, I didn't get notified of this. I apologize greatly for the delay. I am verifying this now.