black trash bin with full of trash

NPM: Maximum call stack size exceeded

You may have cloned a project and tried running ‘npm install’ only to find the following error message:

error Maximum call stack size exceeded

There’s multiple ways I’ve found to fix this:

The Safe ways:

Force clear the NPM cache:

npm cache clean --force
npm install


npm rebuild
npm install

Remove node_modules:

rm -r node_modules
npm install

The Nuclear way:

rm package-lock.json
rm -r node_modules
npm install

As always, I hope this fixes your problem!


  1. Thanks Dano, I did have this problem and you fixed it for me : )

    1. Good to know John! Hope you’re well!

Leave a Reply