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

2.4.0 causes OOM errors in docker running node 12.18.2 #50

Closed
radoi90 opened this issue Nov 23, 2020 · 8 comments
Closed

2.4.0 causes OOM errors in docker running node 12.18.2 #50

radoi90 opened this issue Nov 23, 2020 · 8 comments

Comments

@radoi90
Copy link

radoi90 commented Nov 23, 2020

  • Operating System: Linux Alpine
  • Node Version: 12.18.2
  • NPM Version:
  • webpack Version: 4.44.2
  • eslint-webpack-plugin Version: 2.4.0

The project uses an ejected create-react-app base.

Expected Behavior

Production build to pass.

Actual Behavior

Production build throws OOM sigkill error.

Code

new ESLintPlugin({
  // Plugin options
  extensions: ['js', 'mjs', 'jsx', 'ts', 'tsx'],
  formatter: require.resolve('react-dev-utils/eslintFormatter'),
  eslintPath: require.resolve('eslint'),
  context: paths.appSrc,
  cache: true,
  // ESLint class options
  cwd: paths.appPath,
  resolvePluginsRelativeTo: __dirname,
  baseConfig: {
    extends: [require.resolve('eslint-config-react-app/base')],
    rules: {
      ...(!hasJsxRuntime && {
        'react/react-in-jsx-scope': 'error',
      }),
    },
  },
}),
@radoi90
Copy link
Author

radoi90 commented Nov 23, 2020

Running into the same problem when using the node:14.15.1-alpine image too.

@radoi90
Copy link
Author

radoi90 commented Nov 23, 2020

Setting threads: false seems to solve the issue.

@alexander-akait
Copy link
Member

Please create reproducible test repo, we can't fix something somewhere

@alexander-akait
Copy link
Member

or provide OOM stack as minimum

@michaelangeliu
Copy link
Contributor

As a temp fix, you can try increasing the amount of memory allocated to the node process in the build:
NODE_OPTIONS=--max_old_space_size=4096

@jsg2021
Copy link
Contributor

jsg2021 commented Nov 30, 2020

Should be addressed in #55

@Jayaramstarr
Copy link

Setting threads: false seems to solve the issue.

Can you tell me the file and the file path where to set this?

@ozluy
Copy link

ozluy commented Oct 26, 2021

@Jayaramstarr the settings is in webpack-config regarding eslint you need to override it. Either using library like react-app-rewired or by ejecting it

https://webpack.js.org/plugins/eslint-webpack-plugin/#threads

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants