You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
yangchao-YC
changed the title
Cannot read properties of undefined (reading 'userAgent')
Nuxt3 集成报错 Cannot read properties of undefined (reading 'userAgent')
Feb 19, 2025
描述错误
我是nuxt3的项目,在这个环境下运行项目的时候
在任意页面使用组件,比如
<n-button type="success"> Success </n-button>
项目就会报如下错误,不使用组件则不会报错
{ "url": "/tours/detail?id=666", "statusCode": 500, "statusMessage": "", "message": "Cannot read properties of undefined (reading 'userAgent')", "stack": "<pre><span class=\"stack internal\">at ./node_modules/@juggle/resize-observer/lib/algorithms/calculateBoxSize.js:10:94</span>\n<span class=\"stack internal\">at process.processTicksAndRejections (node:internal/process/task_queues:105:5)</span>\n<span class=\"stack internal\">at async ViteNodeRunner.runModule (./node_modules/vite-node/dist/client.mjs:399:5)</span>\n<span class=\"stack internal\">at async ViteNodeRunner.directRequest (./node_modules/vite-node/dist/client.mjs:381:5)</span>\n<span class=\"stack\">at async ViteNodeRunner.cachedRequest (./node_modules/vite-node/dist/client.mjs:206:14)</span>\n<span class=\"stack internal\">at async ViteNodeRunner.dependencyRequest (./node_modules/vite-node/dist/client.mjs:259:12)</span>\n<span class=\"stack internal\">at async ./node_modules/@juggle/resize-observer/lib/ResizeObserverEntry.js:1:31</span>\n<span class=\"stack internal\">at async ViteNodeRunner.runModule (./node_modules/vite-node/dist/client.mjs:399:5)</span>\n<span class=\"stack internal\">at async ViteNodeRunner.directRequest (./node_modules/vite-node/dist/client.mjs:381:5)</span>\n<span class=\"stack\">at async ViteNodeRunner.cachedRequest (./node_modules/vite-node/dist/client.mjs:206:14)</span></pre>" }
根据控制台的路径,我找到了对应位置,修改了后就不报错了,不知道官方有没有这个问题,能否解决
复现步骤
.
最小复现链接
.
系统信息
.
使用的包管理器
npm
验证
The text was updated successfully, but these errors were encountered: