question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

webpack-dev-server and JavaScript heap out of memory

See original GitHub issue
  • Operating System:macOS
  • Node Version:v8.9.4
  • NPM Version:5.6.0
  • webpack Version:3.6.0
  • webpack-dev-server Version:2.9.1
  • [ x] This is a bug
  • This is a modification request

Code

  // package.json
{"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js"}
  // additional code, remove if not needed.

Expected Behavior

The normal operation

Actual Behavior

FATAL ERROR :CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

For Bugs; How can we reproduce the behavior?

could you tell me how to set Node’s option(node --max_old_space_size=4096) for webpack-dev-server

For Features; What is the motivation and/or use-case for the feature?

thanks

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:42 (4 by maintainers)

github_iconTop GitHub Comments

57reactions
zoltanbedicommented, Jun 27, 2018

Hi, you should ask questions like this in stackoverflow. To answer your question you can run it like this node --max-old-space-size=8192 node_modules/webpack-dev-server/bin/webpack-dev-server.js

55reactions
norfishcommented, Jul 17, 2018

@B3zo0 I don`t think increase the max-old-space-size is a good solution, even though I have not better solution

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack: How to fix "Heap out of memory - m4x
Depending on the Node version this error means that you have reached the limit of what can be held in memory for your...
Read more >
Webpack out of memory - Stack Overflow
Increase your node process's memory limit. ... I tried the solution suggested above of using webpack-dev-server but it hangs(?) or maybe it ...
Read more >
JavaScript heap out of memory with simple webpack build
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory. I have tried running the command ...
Read more >
Ineffective mark-compacts near heap limit Allocation failed ...
Fixing FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory in Webpacker.
Read more >
Build Performance - webpack
Staying up-to-date with Node.js can also help with performance. On top of this, keeping your package manager (e.g. npm or yarn ) up-to-date...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found