When I do
$> yarn generate
I got an error in the storage file.
```ROUTE /
TypeError: Cannot read property 'headers' of undefined
server-bundle.js:4195 Storage.getCookie
server-bundle.js:4195:63
server-bundle.js:4045 Storage.getUniversal
server-bundle.js:4045:20
server-bundle.js:4057 Storage.syncUniversal
server-bundle.js:4057:22
server-bundle.js:3709 Auth.init
server-bundle.js:3709:19
server-bundle.js:3652 module.exports.__webpack_exports__.a
server-bundle.js:3652:16
server-bundle.js:1545 createApp
server-bundle.js:1545:199
it seems issue in storage.js file.
const cookieStr = process.browser
? document.cookie
: this.ctx.req.headers.cookie
```
@pi0 Can you answer this? I am stuck with that.
Hi @essamamdani. If you have a dynamic website with authentication enabled, i think the best way would be to use spa mode (nuxt build --spa --generate)
Thank you @pi0. You are the man.
Most helpful comment
Hi @essamamdani. If you have a dynamic website with authentication enabled, i think the best way would be to use
spamode (nuxt build --spa --generate)