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
If I put ssr: false in nuxt config, it's generate fine.
If I do not place ssr: false, it's failed.
Seems like problem in this line: userAgent = this.ctx.req.headers["user-agent"].
What should I do?
I run npm run build, then npm run generate.
Error output
+ 26 hidden assets
Entrypoint app = server.js server.js.map
WARN [pwa] [icon] Icon not found in C:\Work\mosoblcom\nuxt\static\icon.png
i Full static generation activated 12:11:09
i Generating output directory: nuxt/ 12:11:09
i Generating pages with full static mode 12:11:09
ERROR /company 12:11:09
TypeError: Cannot read properties of undefined (reading 'headers')
at new MobileDetect (node_modules/.cache/nuxt/nuxt-mobile-detect/mobileDetect.js:11:0)
at nuxt_mobile_detect_plugin (node_modules/.cache/nuxt/nuxt-mobile-detect/plugin.js:4:0)
at createApp (node_modules/.cache/nuxt/index.js:230:0)
at async module.exports.__webpack_exports__.default (node_modules/.cache/nuxt/server.js:85:0)
ERROR /contacts 12:11:09
TypeError: Cannot read properties of undefined (reading 'headers')
at new MobileDetect (node_modules/.cache/nuxt/nuxt-mobile-detect/mobileDetect.js:11:0)
at nuxt_mobile_detect_plugin (node_modules/.cache/nuxt/nuxt-mobile-detect/plugin.js:4:0)
at createApp (node_modules/.cache/nuxt/index.js:230:0)
at runNextTicks (node:internal/process/task_queues:61:5)
at listOnTimeout (node:internal/timers:528:9)
at processTimers (node:internal/timers:502:7)
at async module.exports.__webpack_exports__.default (node_modules/.cache/nuxt/server.js:85:0)
ERROR /portfolio 12:11:09
TypeError: Cannot read properties of undefined (reading 'headers')
at new MobileDetect (node_modules/.cache/nuxt/nuxt-mobile-detect/mobileDetect.js:11:0)
at nuxt_mobile_detect_plugin (node_modules/.cache/nuxt/nuxt-mobile-detect/plugin.js:4:0)
at createApp (node_modules/.cache/nuxt/index.js:230:0)
at runNextTicks (node:internal/process/task_queues:61:5)
at listOnTimeout (node:internal/timers:528:9)
at processTimers (node:internal/timers:502:7)
at async module.exports.__webpack_exports__.default (node_modules/.cache/nuxt/server.js:85:0)
ERROR / 12:11:09
TypeError: Cannot read properties of undefined (reading 'headers')
at new MobileDetect (node_modules/.cache/nuxt/nuxt-mobile-detect/mobileDetect.js:11:0)
at nuxt_mobile_detect_plugin (node_modules/.cache/nuxt/nuxt-mobile-detect/plugin.js:4:0)
at createApp (node_modules/.cache/nuxt/index.js:230:0)
at runNextTicks (node:internal/process/task_queues:61:5)
at processTimers (node:internal/timers:499:9)
at async module.exports.__webpack_exports__.default (node_modules/.cache/nuxt/server.js:85:0)
√ Client-side fallback created: 200.html 12:11:09
√ Static manifest generated 12:11:
The text was updated successfully, but these errors were encountered:
As Nuxt 2 has reached End of Life (https://nuxt.com/blog/nuxt2-eol), this issue will now be closed. Please feel free to comment or create a new one if it is still relevant in the Nuxt 3 version of this module.
If I put
ssr: false
in nuxt config, it's generate fine.If I do not place
ssr: false
, it's failed.Seems like problem in this line:
userAgent = this.ctx.req.headers["user-agent"]
.What should I do?
I run
npm run build
, thennpm run generate
.Error output
The text was updated successfully, but these errors were encountered: