Maximum call stack size exceeded on npm install

npm err maximum call stack size exceeded angular
maximum call stack size exceeded nodejs
maximum call stack size exceeded react
maximum call stack size exceeded express
circleci maximum call stack size exceeded
npm install aws amplify cli npm err maximum call stack size exceeded
graceful-fs maximum call stack size exceeded
gulp rangeerror: maximum call stack size exceeded

I'm trying to run npm install, this is output from console:

npm ERR! Linux 4.8.0-27-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8

npm ERR! Maximum call stack size exceeded
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

and this is content of npm-debug.log:

113791 verbose stack RangeError: Maximum call stack size exceeded
113791 verbose stack     at Object.color (/usr/lib/node_modules/npm/node_modules/npmlog/node_modules/console-control-strings/index.js:115:32)
113791 verbose stack     at EventEmitter.log._format (/usr/lib/node_modules/npm/node_modules/npmlog/log.js:252:51)
113791 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npmlog/log.js:138:24)
113791 verbose stack     at emitThree (events.js:116:13)
113791 verbose stack     at emit (events.js:194:7)
113791 verbose stack     at .<anonymous> (/usr/lib/node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/tracker-group.js:23:18)
113791 verbose stack     at emitThree (events.js:116:13)
113791 verbose stack     at emit (events.js:194:7)
113791 verbose stack     at .<anonymous> (/usr/lib/node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/tracker-group.js:23:18)
113791 verbose stack     at emitThree (events.js:116:13)
113791 verbose stack     at emit (events.js:194:7)
113792 verbose cwd /home/giorgi/AdMove/dev/web-advertiser-admove
113793 error Linux 4.8.0-27-generic
113794 error argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
113795 error node v6.9.1
113796 error npm  v3.10.8
113797 error Maximum call stack size exceeded
113798 error If you need help, you may report this error at:
113798 error     <https://github.com/npm/npm/issues>
113799 verbose exit [ 1, true ]

Removed node_modules several times and tried to reinstall. Can't understand what's the reason that causes this and how to fix it.

metzelder's answer helped me fix the issue. however if you run the command npm cache clean, it will give you a message

As of npm@5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid

So, as of npm5 you can do by adding a --force flag to the command.

So the command is:

npm cache clean --force

[Question] npm ERR! Maximum call stack size exceeded · Issue , Maximum call stack size exceeded #296 DEBUG: Using npm: node /home/​ubuntu/renovateapp/node_modules/npm/bin/npm-cli.js install  After removing node_modules/ and package-lock.json and regenerating package-lock.json with npm@5.8.0 via npm i, things install correctly.

npm rebuild it has solved my problem

npm installation is resulting in a Maximum call stack size exceeded , Bug report What is the current behavior? Installing webpack on a fresh project causes npm to fail reporting "Maximum call stack size exceeded. Part of the setup process is an npm install of peerDependencies. When you do this during setup, the install fails with the dreaded npm ERR! Maximum call stack size exceeded which I’ve googled for hours with random work arounds working for some and not others and sometimes reproducible and sometimes not.

Try removing package-lock.json and the node-modules folder:

rm package-lock.json
rm -r node_modules

"Maximum call stack size exceeded" npm install error, If you run that in a clean directory and say “Yes” to install peer deps setup step you will get the error. The offending step is this command: npm install -S babel-polyfill@6.26.0 core-js@2.5.7 prop-types@15.6.2 react@16.2.0 react-dom@16.2.0 . Running that manually after the setup fails produces the same error. I use last version npm version(6.4.1) on windows 10. I try to install webpack, but get error: npm install -g webpack npm ERR! Maximum call stack size exceeded npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\lus2\AppData\Roaming\npm-cache_logs\2019-02-18T05_01_04_511Z-debug.log the log is: Blockquote …

I had the same issue with npm install. After a lot of search, I found out that removing your .npmrc file or its content (found at %USERPROFILE%/.npmrc), will solve this issue. This worked for me.

Npm install maximum call stack size exceeded ??, I installed fresh laravel 5.7. and tried to npm install.. it gives following error log 3264 verbose stack RangeError: Maximum call stack size  npm install any-module-name-here fails with "Maximum call stack size exceeded". I'm using npm@5 in various projects already, but it fails to install / update in a project where I have local symlinks in the tree.

npm uninstall

npm cache clean --force

Im using this two method but it didnt work. After ım deleting node modules and again npm install but it didnt work again. Lastly ım deleting package-lock.json and create new package-lock.json file after that using

npm install

and okay!!!

Maximum call stack size exceeded during npm install, And it consistently errors out on the npm install step citing this error: npm ERR! Maximum call stack size exceeded. In an effort to troubleshoot,  Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. Learn more NPM install error: RangeError: Maximum call stack size exceeded

NPM Install, npm rebuild $ npm i npm ERR! Maximum call stack size exceeded npm ERR! A complete log of this run can be found in: npm ERR! So I could run npm install (yarn install, in my case) and it worked without having to use --no-bin-links or getting any maximum call stack size exceeded errors. 👍 5 Industrial mentioned this issue Jan 22, 2017

Add package-lock.json to lock dependency versions (!1103) · Merge , Maximum call stack size exceeded by removing node_modules/ and Users\​MLM\AppData\Roaming\nvm\v4.8.7\node_modules\npm\lib\install\deps.js:391:27​) npm i -D webpack gives me the npm ERR! Maximum call stack size exceeded. do i need to run the below command to install webpack. npm install --no-optional webpack --save-dev why i am not able to install webpack with npm i webpack ? i am using below versions. node - 8.11.1 npm -5.6.0 package.json

Random crashes with "Maximum call stack size exceeded", Random crashes with "Maximum call stack size exceeded" a problem and the only common factor I can see at the moment is having the npm node installed. The trouble is that when the dependencies are too complicated (I cannot be more specific), the build invariably fails with the message Maximum call stack size exceeded. I have reproduced this for 2 independent projects, on different machines.

Comments
  • First of all, I'd check the github issues link for similar problems, and add it if it's not a known problem. Also, why are you trying to install v4.2.6? The current latest build is v7.1.0, and the recommended stable build is v6.9.1. Clear everything out, try 6.9.1, and update the question.
  • Updated to v6.9.1 still got same error and updated question also. Thanks anyway TheEnvironmentalist
  • Some advice around here github.com/npm/npm/issues/10776
  • I sure hope you know what you are doing.
  • On a Node v10.15.1 and npm 6.4.1 environment this worked like a charm! Thanks a lot.
  • As for me I had move the current working directory to another folder – seems like it mixed up npm. Deleting node_modules and reinstalling did the trick
  • Can anyone explain this answer further? Why does this solve the problem?
  • doesn't seem to work for me on mac
  • deleted package-lock.json and npm rebuild did the trick for me
  • in my case, certain files in my .npm folder were installed as root. npm cache verify tells you what is wrong.
  • You're killing the purpose of package-lock.json if you delete it. It guarantees that your dependencies will be deterministic.
  • True, but if you can't install your app on say a different platform, then you have no choice but to do this.
  • Deleting the package-lock.json file fixed it for me, Thanks!
  • Message from npm cache clean: "As of npm@5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid."
  • funny enough i had to restart ,my computer in addition to your steps for it to work, since i am working with wsl