<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="❯ npm -v
6.14.4"><pre class="notranslate"><code class="notranslate">❯ npm -v
6.14.4
</code></pre></div>
<h1 dir="auto">What / Why</h1>
<p dir="auto"><code class="notranslate">npm ls</code> incorrectly says package is missing, but it is not (it is symlinked).</p>
<h2 dir="auto">When</h2>
<p dir="auto">First, before symlinking anything with <code class="notranslate">npm link</code>, I see this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="❯ rm -rf node_modules
                                                                                                                                            
❯ npm i
added 151 packages from 149 contributors and audited 1231 packages in 2.073s

2 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

                                                                                                                                            
❯ npm ls solid-js
my-project@ /home/trusktr/src/my-project
└─┬ @lume/element@0.0.7
  ├─┬ @lume/variable@0.0.3
  │ └── solid-js@0.16.14  deduped
  └── solid-js@0.16.14 "><pre class="notranslate"><code class="notranslate">❯ rm -rf node_modules
                                                                                                                                            
❯ npm i
added 151 packages from 149 contributors and audited 1231 packages in 2.073s

2 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

                                                                                                                                            
❯ npm ls solid-js
my-project@ /home/trusktr/src/my-project
└─┬ @lume/element@0.0.7
  ├─┬ @lume/variable@0.0.3
  │ └── solid-js@0.16.14  deduped
  └── solid-js@0.16.14 
</code></pre></div>
<h2 dir="auto">Where</h2>
<p dir="auto">In my terminal.</p>
<h2 dir="auto">How</h2>
<p dir="auto">with <code class="notranslate">npm link</code></p>
<h3 dir="auto">Current Behavior</h3>
<p dir="auto">Then, when I symlink a project that I'm working on externally and I want to test it inside an application, I link it then I see this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="❯ npm link @lume/element
/home/trusktr/src/my-project/node_modules/@lume/element -&gt; /home/trusktr/.npm-packages/lib/node_modules/@lume/element -&gt; /home/trusktr/src/lume+umbrella/packages/element
                                                                                                                                            
❯ npm ls solid-js
my-project@ /home/trusktr/src/my-project
└─┬ UNMET DEPENDENCY @lume/element@0.0.7
  ├─┬ @lume/variable@0.0.3
  │ └── solid-js@0.16.14  deduped
  └── solid-js@0.16.14 "><pre class="notranslate"><code class="notranslate">❯ npm link @lume/element
/home/trusktr/src/my-project/node_modules/@lume/element -&gt; /home/trusktr/.npm-packages/lib/node_modules/@lume/element -&gt; /home/trusktr/src/lume+umbrella/packages/element
                                                                                                                                            
❯ npm ls solid-js
my-project@ /home/trusktr/src/my-project
└─┬ UNMET DEPENDENCY @lume/element@0.0.7
  ├─┬ @lume/variable@0.0.3
  │ └── solid-js@0.16.14  deduped
  └── solid-js@0.16.14 
</code></pre></div>
<p dir="auto">NPM says <code class="notranslate">UNMET DEPENDENCY</code>, but the dependency is there! My application works fine, so the build tools see everything just fine.</p>
<h3 dir="auto">Steps to Reproduce</h3>
<p dir="auto">In this case, my app depends on <code class="notranslate">@lume/element</code> which is <code class="notranslate">npm linked</code> into the app. <code class="notranslate">@lume/element</code> depends on <code class="notranslate">@lume/variable</code> which is symlinked into <code class="notranslate">@lume/element</code>. And finally, <code class="notranslate">@lume/variable</code> contains the <code class="notranslate">solid-js</code> dependency.</p>
<p dir="auto">Basically, I see this in node_modules:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="❯ find -L node_modules -type d | grep -E &quot;solid-js$|@lume/variable$|@lume/element$&quot;
node_modules/solid-js
node_modules/@lume/variable
node_modules/@lume/element
node_modules/@lume/element/node_modules/@lume/variable
node_modules/@lume/element/node_modules/@lume/variable/node_modules/solid-js
find: File system loop detected; ‘node_modules/@lume/element/node_modules/lowclass/meteor-package/testApp/packages/motor’ is part of the same file system loop as ‘node_modules/@lume/element/node_modules/lowclass/meteor-package’."><pre class="notranslate"><code class="notranslate">❯ find -L node_modules -type d | grep -E "solid-js$|@lume/variable$|@lume/element$"
node_modules/solid-js
node_modules/@lume/variable
node_modules/@lume/element
node_modules/@lume/element/node_modules/@lume/variable
node_modules/@lume/element/node_modules/@lume/variable/node_modules/solid-js
find: File system loop detected; ‘node_modules/@lume/element/node_modules/lowclass/meteor-package/testApp/packages/motor’ is part of the same file system loop as ‘node_modules/@lume/element/node_modules/lowclass/meteor-package’.
</code></pre></div>
<p dir="auto">I don't think the symlink loop has to do with it, does it?</p>
<p dir="auto">Also, due to running <code class="notranslate">npm link @lume/element</code>, now there are duplicate packages (<code class="notranslate">solid-js</code> and <code class="notranslate">@lume/variable</code>_ in node_modules.</p>
<p dir="auto"><code class="notranslate">npm link</code> in general has problems, it seems, and problems crop up especially when libraries expect to export singletons (which is what led me to investigate my node_modules).</p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">Issues with <code class="notranslate">npm link</code> aside, the dependency should not be considered unmet, because it is clearly there.</p>
<h2 dir="auto">Who</h2>
<p dir="auto">Anyone <code class="notranslate">npm link</code>ing things.</p>
<h2 dir="auto">References</h2>
<ul dir="auto">
<li>n/a</li>
</ul>
<p dir="auto">Getting npm error when tried to install carthage.</p>
<p dir="auto">npm - 6.9.0<br>
Command- npm install carthage</p>
<p dir="auto">Here is the error log<br>
0 info it worked if it ends with ok<br>
1 verbose cli [ '/usr/local/bin/node',<br>
1 verbose cli   '/usr/local/bin/npm',<br>
1 verbose cli   'install',<br>
1 verbose cli   'carthage' ]<br>
2 info using npm@6.9.0<br>
3 info using node@v10.16.3<br>
4 verbose config Skipping project config: /Users/usrName/.npmrc. (matches userconfig)<br>
5 verbose npm-session 7bb22338421ff355<br>
6 silly install loadCurrentTree<br>
7 silly install readLocalPackageData<br>
8 timing npm Completed in 2026ms<br>
9 error cb() never called!<br>
10 error This is an error with npm itself. Please report this error at:<br>
11 error <a href="https://npm.community" rel="nofollow">https://npm.community</a></p>