Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

npm markAsFailed recursion results in "Maximum call stack size exceeded" #12781

Closed
vtravieso opened this issue May 20, 2016 · 2 comments
Closed

Comments

@vtravieso
Copy link
Contributor

Invoking an npm command on the 'cli-color' package results in a "Maximum call stack size exceeded".

Node: v4.4.4
npm: v3.9.2

Steps to reproduce:

  1. npm install -g cli-color
  2. change directory to where cli-color is installed
  3. npm uninstall foo

Result: Npm throws the error "Maximum call stack size exceeded"

The error seems to be caused by the cli-color package having circular dependencies, which causes an infinite recursion in the npm code that marks a package and its reqs as failed (node_modules\npm\lib\install\actions.js:54:16) - see attached log file.

Skipping the recursion when the req has already been flagged avoids the error.

npm-debug.zip

@jblotus
Copy link

jblotus commented Aug 5, 2016

+1

I had similar issue - disabling progress actually allowed my install to complete
npm set progress=false && rm -rf ~/.npm && rm -rf node_modules && npm install

#11283

my debug output from the failure:
54933 silly build readable-stream@1.0.34
54934 verbose stack RangeError: Maximum call stack size exceeded
54934 verbose stack at Object.color (/usr/local/lib/node_modules/npm/node_modules/npmlog/node_modules/console-control-strings/index.js:117:39)
54934 verbose stack at EventEmitter.log._format (/usr/local/lib/node_modules/npm/node_modules/npmlog/log.js:255:30)
54934 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npmlog/log.js:138:24)
54934 verbose stack at emitThree (events.js:97:13)
54934 verbose stack at emit (events.js:175:7)
54934 verbose stack at null. (/usr/local/lib/node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/tracker-group.js:23:18)
54934 verbose stack at emitThree (events.js:97:13)
54934 verbose stack at emit (events.js:175:7)
54934 verbose stack at null. (/usr/local/lib/node_modules/npm/node_modules/npmlog/node_modules/are-we-there-yet/tracker-group.js:23:18)
54934 verbose stack at emitThree (events.js:97:13)
54934 verbose stack at emit (events.js:175:7)
54935 verbose cwd /home/nodetemp
54936 error Linux 2.6.32-504.el6.x86_64
54937 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--no-bin-links"

@npm-robot
Copy link

We're closing this issue as it has gone seven days without activity and without being labeled. If we haven't even labeled in issue in seven days then we're unlikely to ever read it.

If you are still experiencing the issue that led to you opening this or this is a feature request you're still interested in then we encourage you to open a new issue. If this was a support issue, you may be better served by joining package.communty and asking your question there.

For more information about our new issue aging policies and why we've instituted them please see our blog post.

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

No branches or pull requests

3 participants