NOVU - INBOX - Next.js
Hi everyone, im trying to use NOVU Inbox component on Next.js but its throwing an error - TypeError: Cannot read properties of undefined (reading 'request').
Could anyone help?
10 Replies
@Achi are you using Inbox in client component uding "use client" directive
yeah
Can you please share the nextjs and @novu/react version
Next.js v14.2.13
@novu/react v2.4.0
@Achi
I could not replace this issue with above versions
Checkout this sample repo
https://github.com/jainpawan21/novu-inbox-playground
@Achi, you just advanced to level 1!
Thanks Pawan, i found out that it was the issue with http. navigator.lock did not exist
@Achi how did you solve that? I double posted not realizing you had posted this
and I'm having the same problem
or a similar one at least
@Achi
it was the issue with http. navigator.lock did not existWas this issue related to
@novu/react
@elmd @novu/react is using websockets for live updates. which needs project to be run with HTTPS. try running your project with https.
@Pawan Jain I would recomend adding optional chaining in packages > js > src > ui > helpers > browser.ts. on 9th line you have code - navigator.locks.request, replace this with navigator?.locks?.request because it causes errors in dev mode while running with http because navigator.locks does not exist in that case.