In nuxt.config.js
auth: {
localStorage: {
prefix: '[' + window.location.hostname + ']'
},
In output:
FATAL window is not defined 10:33:30
at nuxt.config.js:237:21
at jiti (node_modules/jiti/dist/jiti.js:1:196506)
at Object.loadNuxtConfig (node_modules/@nuxt/config/dist/config.js:1082:15)
at loadNuxtConfig (node_modules/@nuxt/cli/dist/cli-index.js:338:32)
at NuxtCommand.getNuxtConfig (node_modules/@nuxt/cli/dist/cli-index.js:463:26)
at Object._listenDev (node_modules/@nuxt/cli/dist/cli-dev.js:75:30)
at Object.startDev (node_modules/@nuxt/cli/dist/cli-dev.js:58:25)
at Object.run (node_modules/@nuxt/cli/dist/cli-dev.js:52:16)
at NuxtCommand.run (node_modules/@nuxt/cli/dist/cli-index.js:413:22)
╭───────────────────────────────────────────╮
│ │
│ ✖ Nuxt Fatal Error │
│ │
│ ReferenceError: window is not defined │
│ │
Prefix must be window.location.hostname:
In localstorage:
auth._token.local : Bearer 707d7bfd03e63694c3b3b6a5fe3eabc1
Must be:
[mysite.local]auth._token.local : Bearer 707d7bfd03e63694c3b3b6a5fe3eabc1