cycles due to npm link causing Maximum call stack size exceeded #16994
Comments
FWIW, I’m not experiencing this bug on my Linux box, but a co-worker with a Mac is having the issue. |
I've had this bug on a Windows 10 machine, but not on MacOS (10.10.4) |
There are several issues that all seem to be related (or duplicates). The common thread seems to be that when Related Issues: |
some spelunking has yielded more info (although still incomplete, as I have not had additional free cycles): Given: <project>/node_module/foo --> ~/foo // symlink
~/foo/node_modules/bar // devDependency of foo
<project>node_modules/bar // dependency And,
Unfortunately, the This results in one of the Unfortunately I believe the bandaid introduced #16937 obscured the problem slightly... I believe the internal My instinct suggests pushing more of this responsibility to |
I'm opening this issue because:
What's going wrong?
When node_modules contains a cycle (due to
npm link
)npm install
will stack overflow:xxx-debug.log
Specifically, read-package-tree can return a cyclic graph and
Installer.prototype.normalizeCurrentTree
expectscurrentTree
to be acyclicnpm/lib/install.js
Lines 365 to 380 in d654a8e
StackOverflow
.How can the CLI team reproduce the problem?
contrived example that appears to reproduce this issue:
But it appears to also be an issue in more realistic examples with larger cycles.
supporting information:
npm -v
prints:5.0.2
node -v
prints:v7.4.0
npm config get registry
prints:http://registry.npmjs.org/
The text was updated successfully, but these errors were encountered: