nuxt-multi-cache icon indicating copy to clipboard operation
nuxt-multi-cache copied to clipboard

Hangs after build with module @nuxt/content

Open unluckynelson opened this issue 2 years ago • 0 comments

Edit: Reproduced with a new nuxt app, it seems that when [email protected] is installed with @nuxt/[email protected] then the build hangs

As it says, hangs after ✔ You can preview this build using node .output/server/index.mjs which prevents my build pipelines from completing. But works fine during dev

Nuxi info:

- Operating System: `Linux`
- Node Version:     `v18.17.1`
- Nuxt Version:     `3.7.4`
- CLI Version:      `3.9.0`
- Nitro Version:    `2.6.3`
- Package Manager:  `[email protected]`
- Builder:          `-`
- User Config:      `devtools`, `ssr`, `modules`, `multiCache`, `i18n`, `build`, `nitro`, `loading`, `app`, `content`, `server`, `runtimeConfig`, `delayHydration`, `image`, `css`, `tailwindcss`, `postcss`, `vite`
- Runtime Modules:  `[email protected]`, `@nuxtjs/[email protected]`, `@nuxtjs/[email protected]`, `[email protected]`, `@nuxtjs/[email protected]`, `@nuxt/[email protected]`, `[email protected]`, `@pinia/[email protected]`, `@pinia-plugin-persistedstate/[email protected]`, `[email protected]`
- Build Modules:    `-`

my nuxt.config:

export default defineNuxtConfig({
  devtools: {
    enabled: true,

    timeline: {
      enabled: true,
    },
  },

  ssr: true,

  modules: [
    "nuxt-graphql-client",
    "@nuxtjs/tailwindcss",
    "@nuxtjs/device",
    "nuxt-schema-org",
    "@nuxtjs/i18n",
    "@nuxt/content",
    "nuxt-swiper",
    "@pinia/nuxt",
    "@pinia-plugin-persistedstate/nuxt",
    "nuxt-multi-cache"
  ],

  multiCache: {
    component: {
      enabled: true,
    },
    data: {
      enabled: true,
    },
    route: {
      enabled: true,
    },
    // Purge or inspect api [read more](https://nuxt-multi-cache.dulnan.net/features/api)
    api: {
      enabled: process.env.VIATU_ENV !== 'prod',
      prefix: '/__cache',
      authorization: false,
      cacheTagInvalidationDelay: 60000
    },
    debug: true
  },
});

My multiCache.serverOptions.ts

export default defineMultiCacheOptions({
  data: {
    storage: {
      driver: redisDriver({
        base: 'data:',
        host: process.env.CACHE_HOST,
        port: parseInt(process.env.CACHE_PORT ? process.env.CACHE_PORT : '6379'),
      }),
    },
  },

  component: {
    storage: {
      driver: redisDriver({
        base: 'component:',
        host: process.env.CACHE_HOST,
        port: parseInt(process.env.CACHE_PORT ? process.env.CACHE_PORT : '6379'),
      }),
    },
  },
  route: {
    storage: {
      driver: redisDriver({
        base: 'route:',
        host: process.env.CACHE_HOST,
        port: parseInt(process.env.CACHE_PORT ? process.env.CACHE_PORT : '6379'),
      }),
    }
  },
})

unluckynelson avatar Oct 18 '23 07:10 unluckynelson