N
Novu2mo ago
Achi

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?
No description
10 Replies
Pawan Jain
Pawan Jain2mo ago
@Achi are you using Inbox in client component uding "use client" directive
Achi
AchiOP2mo ago
yeah
Pawan Jain
Pawan Jain2mo ago
Can you please share the nextjs and @novu/react version
Achi
AchiOP2mo ago
Next.js v14.2.13 @novu/react v2.4.0
Pawan Jain
Pawan Jain2mo ago
@Achi I could not replace this issue with above versions Checkout this sample repo https://github.com/jainpawan21/novu-inbox-playground
Novu_Bot
Novu_Bot2mo ago
@Achi, you just advanced to level 1!
Achi
AchiOP2mo ago
Thanks Pawan, i found out that it was the issue with http. navigator.lock did not exist
elmd
elmd2mo ago
@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
Pawan Jain
Pawan Jain2mo ago
@Achi
it was the issue with http. navigator.lock did not exist
Was this issue related to @novu/react
Achi
AchiOP2mo ago
@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.
Want results from more Discord servers?
Add your server