Skip to content
This repository was archived by the owner on Feb 20, 2025. It is now read-only.
This repository was archived by the owner on Feb 20, 2025. It is now read-only.

req is not available in nuxtServerInit #799

Description

@PaulBouisset

When deployed on Vercel the value req is undefined in nuxtServerInit in my store index.js file:

export const actions = {
  async nuxtServerInit ({ state, dispatch, commit }, { req }) {
    console.log(req); // this is undefined on vercel
  }
}

My config:

{
  "version": 2,
  "builds": [
    {
      "src": "nuxt.config.js",
      "use": "@nuxtjs/vercel-builder",
      "config": {
        "serverFiles": ["api/**"],
        "internalServer":true
      }
    }
  ]
}

Is it because of internalServer:true ? Is there a specific option I need to change?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions