I have a fairly large number of packages that are outdated and I want to update. I tried running npm update as described in the npm documentation: npm update --depth 9999 -dev
The update took a long time and at the end it failed. I tried a few more time, I set the stack size to unlimited, etc, but it always takes hours and at the end it fails.
I tried updating a single package with --depth 999 (not 9999) and that failed as well.
Is there any recommended way how to update all packages that works?
**Edit:** At first I was getting `MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to increase limit`
Then I got a heap exceeded exception:
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
And finally, I got Max call stack size exceeded.
I set the stack size to unlimited and lowered the depth, but it's been running for hours with no result.