title: Can't set cookie on server side Nuxt.js
body: <p>I am using initial Nuxt function, that is invoked on reload, to set important data like userId and token. I can read data from cookie, but I can't save data to cookie.</p>
  <pre><code>initAuth(context, req) {
  try {
    const cookie = req.headers.cookie
    if (req &amp;&amp; cookie) {
      let token = getCookieServerSide('token', cookie)
      let userId = getCookieServerSide('userId', cookie)
      let deviceId = getCookieServerSide('deviceId', cookie)
  
      if (token) {
        context.commit('SET_TOKEN', { token })
      }
      if (userId) {
        userId = parseInt(userId)
        context.commit('users/SET_USER_ID', userId, { root: true })
      }
      if (!deviceId) {
        deviceId = generateUniqueId()
        setCookie('deviceId', deviceId)
      }
      context.commit('SET_DEVICE_ID', deviceId)
    }
  } catch (error) {}
  </code></pre>
  <p>This is initial method, and <code>setCookie</code> looks like this:</p>
  <pre><code>export const setCookie = (name, value) =&gt; {
    Cookie.set(name, value)
  }
  </code></pre>
  <p>By reading different comments this should be valid solution, but cookie isn't saved</p>