nuxt-modules / apollo

Nuxt.js module to use Vue-Apollo. The Apollo integration for GraphQL.
https://apollo.nuxtjs.org
MIT License
929 stars 194 forks source link

WARN Slow module @nuxtjs/apollo took 209076.58ms to setup. #520

Open Artem-Schander opened 1 year ago

Artem-Schander commented 1 year ago

Environment

Describe the bug

Slow build / dev server

Expected behaviour

regular speed

Reproduction

  1. remove yarn.lock
  2. add package.json
    {
    "scripts": {
        "build": "nuxt build",
        "dev": "nuxt dev",
        "generate": "nuxt generate",
        "preview": "nuxt preview",
        "postinstall": "nuxt prepare"
    },
    "devDependencies": {
        "@nuxt/devtools": "latest",
        "@pinia/nuxt": "^0.4.11",
        "@types/node": "^18",
        "nuxt": "^3.6.1"
    },
    "dependencies": {
        "@nuxtjs/apollo": "5.0.0-alpha.6"
    }
    }
  3. run yarn

Additional context

No response

Logs

No response

Artem-Schander commented 1 year ago

Here is a yarn.lock which is not slow I know, it's bloated. sorry

omar-labana commented 1 year ago

@Artem-Schander are you adding apollo as a dependency, not as a dev dependency?

Artem-Schander commented 1 year ago

apollo itself is not in my package.json @nuxtjs/apollo is a dev dependency

So more like this:

{
    "scripts": {
        "build": "nuxt build",
        "dev": "nuxt dev",
        "generate": "nuxt generate",
        "preview": "nuxt preview",
        "postinstall": "nuxt prepare"
    },
    "devDependencies": {
       "@nuxtjs/apollo": "5.0.0-alpha.6",
        "@nuxt/devtools": "latest",
        "@pinia/nuxt": "^0.4.11",
        "@types/node": "^18",
        "nuxt": "^3.6.1"
    }
}