Link to the code that reproduces this issue
https://github.com/Milad1412/reproduce_device_detection_issue
To Reproduce
- On a MacOs device start application in either production or dev mode
- see the log and you find the issue that
device.type is undefined in the console log of server's terminal
Current vs. Expected behavior
I expect to see a valid value for type of device, while I see undefined on Mac.
Provide environment information
Operating System: MacOs 26.1
Browser: Chrome, Safari
pnpm: 10.18.3
node: 22.19.0
Which area(s) are affected? (Select all that apply)
Middleware
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local), next start (local)
Additional context
No response