Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extreme memory usage #1343

Closed
ahas opened this issue Nov 12, 2021 · 5 comments
Closed

Extreme memory usage #1343

ahas opened this issue Nov 12, 2021 · 5 comments

Comments

@ahas
Copy link

ahas commented Nov 12, 2021

Version

@nuxtjs/i18n: 7.2.0
nuxt: 2.15.7

Nuxt configuration

Just default configuration created by create-nuxt-app

import colors from "vuetify/es5/util/colors";

export default {
  // Global page headers: https://go.nuxtjs.dev/config-head
  head: {
    titleTemplate: "%s - nuxt-i18n",
    title: "nuxt-i18n",
    htmlAttrs: {
      lang: "en",
    },
    meta: [
      { charset: "utf-8" },
      { name: "viewport", content: "width=device-width, initial-scale=1" },
      { hid: "description", name: "description", content: "" },
      { name: "format-detection", content: "telephone=no" },
    ],
    link: [{ rel: "icon", type: "image/x-icon", href: "/favicon.ico" }],
  },

  // Global CSS: https://go.nuxtjs.dev/config-css
  css: [],

  // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  plugins: [],

  // Auto import components: https://go.nuxtjs.dev/config-components
  components: true,

  // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  buildModules: [
    // https://go.nuxtjs.dev/typescript
    "@nuxt/typescript-build",
    // https://go.nuxtjs.dev/vuetify
    "@nuxtjs/vuetify",
  ],

  // Modules: https://go.nuxtjs.dev/config-modules
  modules: [
    // https://go.nuxtjs.dev/axios
    "@nuxtjs/axios",
    "@nuxtjs/i18n",
  ],

  // Axios module configuration: https://go.nuxtjs.dev/config-axios
  axios: {},

  // Vuetify module configuration: https://go.nuxtjs.dev/config-vuetify
  vuetify: {
    customVariables: ["~/assets/variables.scss"],
    theme: {
      dark: true,
      themes: {
        dark: {
          primary: colors.blue.darken2,
          accent: colors.grey.darken3,
          secondary: colors.amber.darken3,
          info: colors.teal.lighten1,
          warning: colors.amber.base,
          error: colors.deepOrange.accent4,
          success: colors.green.accent3,
        },
      },
    },
  },

  // Build Configuration: https://go.nuxtjs.dev/config-build
  build: {},
};

@nuxtjs/i18n configuration

No config, it will be happen when you just add module.

Steps to reproduce

  1. create-nuxt-app, follow configurations below

create-nuxt-app v3.7.1
✨ Generating Nuxt.js project in .
? Project name: nuxt-i18n
? Programming language: TypeScript
? Package manager: Yarn
? UI framework: Vuetify.js
? Nuxt.js modules: Axios - Promise based HTTP client
? Linting tools: (Press to select, to toggle all, to invert selection)
? Testing framework: None
? Rendering mode: Universal (SSR / SSG)
? Deployment target: Server (Node.js hosting)
? Development tools: (Press to select,
to toggle all, to invert selection)
? What is your GitHub username? ahas
? Version control system: None

  1. yarn add @nuxtjs/i18n
  2. add @nuxtjs/i18n to modules in nuxt.config.js
  3. yarn dev or npm start dev
  4. locate browser to nuxt page (default localhost:3000)
  5. refresh refresh and refresh again

What is Expected?

Memory will be released by garbage collector

What is actually happening?

memory usage is over 4GB
then FATAL ERROR: Reached heap limit Allocation failed

@ahas ahas added the bug 🐛 label Nov 12, 2021
@ahas
Copy link
Author

ahas commented Nov 12, 2021

Quick Fix: Adding { build: { standalone: true } } option can solve the problem.

@rchl
Copy link
Collaborator

rchl commented Nov 12, 2021

Development mode plugin leak: #1039

@rahulkumarsingh73690
Copy link

+1

1 similar comment
@matystu
Copy link

matystu commented Feb 14, 2022

+1

@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 16, 2022
@stale stale bot closed this as completed Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants