JavaScript heap out of memory when trying to build a Nuxt app

Hey @HassanZahirnia,

The bug has been identified in one of our dependencies: test for out of memory problem with complex glob by danez · Pull Request #533 · isaacs/node-glob (github.com).

Till then, a workaround for you could be:

postcss: {
     plugins: {
       tailwindcss: {},
       autoprefixer: {},
      cssnano:
        process.env.NODE_ENV === 'production'
          ? { preset: ['default', { discardComments: { removeAll: true } }] }
          : false, // disable cssnano when not in production
     },
  }

adding something like that in your nuxt.config

1 Like