N
Novu2w 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 Jain2w ago
@Achi are you using Inbox in client component uding "use client" directive
Achi
Achi2w ago
yeah
Pawan Jain
Pawan Jain2w ago
Can you please share the nextjs and @novu/react version
Achi
Achi2w ago
Next.js v14.2.13 @novu/react v2.4.0
Pawan Jain
Pawan Jain2w 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_Bot2w ago
@Achi, you just advanced to level 1!
Achi
Achi2w ago
Thanks Pawan, i found out that it was the issue with http. navigator.lock did not exist
elmd
elmd2w 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 Jain2w ago
@Achi
it was the issue with http. navigator.lock did not exist
Was this issue related to @novu/react
Achi
Achi2w 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