<h3 dir="auto">Is there an existing issue for this?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the existing issues</li>
</ul>
<h3 dir="auto">Current Behavior</h3>
<p dir="auto">High CPU usage with no sign of stopping.</p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">The package gets installed.</p>
<h3 dir="auto">Steps To Reproduce</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="npm install brettz9/rollup-plugin-postprocess#update --save-dev"><pre class="notranslate"><code class="notranslate">npm install brettz9/rollup-plugin-postprocess#update --save-dev
</code></pre></div>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>OS: macOS 10.15.7 (19H524)</li>
<li>Node: v16.9.1</li>
<li>npm: 7.23.0</li>
</ul>
<h3 dir="auto">Is there an existing issue for this?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the existing issues</li>
</ul>
<h3 dir="auto">Current Behavior</h3>
<p dir="auto">Running <code class="notranslate">npm install</code> in my repository without a <code class="notranslate">package-lock.json</code> file enters an infinite loop inside npm for a dependency in a workspace.</p>
<details>
<summary>Looping part of the logs with `--loglevel silly`</summary>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="npm timing idealTree:node_modules/@nivo/core Completed in 6ms
npm timing idealTree:node_modules/@nivo/recompose Completed in 1ms
npm sill placeDep ROOT @nivo/annotations@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep ROOT @nivo/axes@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep ROOT @nivo/colors@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep ROOT @nivo/legends@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep ROOT @nivo/scales@0.70.0 OK for: @nivo/scatterplot@0.70.1 want: 0.70.0
npm sill placeDep ROOT @nivo/voronoi@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep node_modules/@nivo/scatterplot react-motion@0.5.2 OK for: @nivo/scatterplot@0.70.1 want: ^0.5.2
npm sill placeDep ROOT react@16.14.0 REPLACE for: react-motion@0.5.2 want: ^0.14.9 || ^15.3.0 || ^16.0.0
npm sill timing Tried to end timer that doesn't exist: idealTree:#root
npm sill placeDep ROOT @nivo/scatterplot@0.70.1 OK for: repro-ws@0.0.0 want: ^0.70.1
npm sill placeDep ROOT @nivo/core@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep ROOT @nivo/tooltip@0.70.1 OK for: @nivo/core@0.70.1 want: 0.70.1
npm sill placeDep ROOT prop-types@15.7.2 OK for: @nivo/core@0.70.1 want: &gt;= 15.5.10 &lt; 16.0.0
npm timing idealTree:ws Completed in 6ms
npm sill placeDep ROOT @nivo/recompose@0.70.0 OK for: @nivo/core@0.70.1 want: 0.70.0
npm sill placeDep ROOT @react-spring/web@9.1.2 OK for: @nivo/core@0.70.1 want: 9.1.2
npm sill placeDep ROOT react-dom@17.0.2 OK for: @react-spring/web@9.1.2 want: &gt;=16.8
npm sill placeDep ROOT react@17.0.2 REPLACE for: react-dom@17.0.2 want: 17.0.2
npm timing idealTree:node_modules/@nivo/core Completed in 6ms
npm timing idealTree:node_modules/@nivo/recompose Completed in 0ms
npm sill placeDep ROOT @nivo/annotations@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep ROOT @nivo/axes@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep ROOT @nivo/colors@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep ROOT @nivo/legends@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep ROOT @nivo/scales@0.70.0 OK for: @nivo/scatterplot@0.70.1 want: 0.70.0
npm sill placeDep ROOT @nivo/voronoi@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep node_modules/@nivo/scatterplot react-motion@0.5.2 OK for: @nivo/scatterplot@0.70.1 want: ^0.5.2
npm sill placeDep ROOT react@16.14.0 REPLACE for: react-motion@0.5.2 want: ^0.14.9 || ^15.3.0 || ^16.0.0
npm sill timing Tried to end timer that doesn't exist: idealTree:#root
npm sill placeDep ROOT @nivo/scatterplot@0.70.1 OK for: repro-ws@0.0.0 want: ^0.70.1
npm sill placeDep ROOT @nivo/core@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep ROOT @nivo/tooltip@0.70.1 OK for: @nivo/core@0.70.1 want: 0.70.1
npm sill placeDep ROOT prop-types@15.7.2 OK for: @nivo/core@0.70.1 want: &gt;= 15.5.10 &lt; 16.0.0
npm timing idealTree:ws Completed in 7ms
npm sill placeDep ROOT @nivo/recompose@0.70.0 OK for: @nivo/core@0.70.1 want: 0.70.0
npm sill placeDep ROOT @react-spring/web@9.1.2 OK for: @nivo/core@0.70.1 want: 9.1.2
npm sill placeDep ROOT react-dom@17.0.2 OK for: @react-spring/web@9.1.2 want: &gt;=16.8
npm sill placeDep ROOT react@17.0.2 REPLACE for: react-dom@17.0.2 want: 17.0.2
npm timing idealTree:node_modules/@nivo/core Completed in 6ms
npm timing idealTree:node_modules/@nivo/recompose Completed in 0ms
npm sill placeDep ROOT @nivo/annotations@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep ROOT @nivo/axes@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep ROOT @nivo/colors@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep ROOT @nivo/legends@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep ROOT @nivo/scales@0.70.0 OK for: @nivo/scatterplot@0.70.1 want: 0.70.0
npm sill placeDep ROOT @nivo/voronoi@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep node_modules/@nivo/scatterplot react-motion@0.5.2 OK for: @nivo/scatterplot@0.70.1 want: ^0.5.2
npm sill placeDep ROOT react@16.14.0 REPLACE for: react-motion@0.5.2 want: ^0.14.9 || ^15.3.0 || ^16.0.0
npm sill timing Tried to end timer that doesn't exist: idealTree:#root
npm sill placeDep ROOT @nivo/scatterplot@0.70.1 OK for: repro-ws@0.0.0 want: ^0.70.1
npm sill placeDep ROOT @nivo/core@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep ROOT @nivo/tooltip@0.70.1 OK for: @nivo/core@0.70.1 want: 0.70.1
npm sill placeDep ROOT prop-types@15.7.2 OK for: @nivo/core@0.70.1 want: &gt;= 15.5.10 &lt; 16.0.0
npm timing idealTree:ws Completed in 25ms
npm sill placeDep ROOT @nivo/recompose@0.70.0 OK for: @nivo/core@0.70.1 want: 0.70.0
npm sill placeDep ROOT @react-spring/web@9.1.2 OK for: @nivo/core@0.70.1 want: 9.1.2
npm sill placeDep ROOT react-dom@17.0.2 OK for: @react-spring/web@9.1.2 want: &gt;=16.8
npm sill placeDep ROOT react@17.0.2 REPLACE for: react-dom@17.0.2 want: 17.0.2
npm timing idealTree:node_modules/@nivo/core Completed in 17ms
npm timing idealTree:node_modules/@nivo/recompose Completed in 0ms"><pre class="notranslate"><code class="notranslate">npm timing idealTree:node_modules/@nivo/core Completed in 6ms
npm timing idealTree:node_modules/@nivo/recompose Completed in 1ms
npm sill placeDep ROOT @nivo/annotations@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep ROOT @nivo/axes@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep ROOT @nivo/colors@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep ROOT @nivo/legends@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep ROOT @nivo/scales@0.70.0 OK for: @nivo/scatterplot@0.70.1 want: 0.70.0
npm sill placeDep ROOT @nivo/voronoi@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep node_modules/@nivo/scatterplot react-motion@0.5.2 OK for: @nivo/scatterplot@0.70.1 want: ^0.5.2
npm sill placeDep ROOT react@16.14.0 REPLACE for: react-motion@0.5.2 want: ^0.14.9 || ^15.3.0 || ^16.0.0
npm sill timing Tried to end timer that doesn't exist: idealTree:#root
npm sill placeDep ROOT @nivo/scatterplot@0.70.1 OK for: repro-ws@0.0.0 want: ^0.70.1
npm sill placeDep ROOT @nivo/core@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep ROOT @nivo/tooltip@0.70.1 OK for: @nivo/core@0.70.1 want: 0.70.1
npm sill placeDep ROOT prop-types@15.7.2 OK for: @nivo/core@0.70.1 want: &gt;= 15.5.10 &lt; 16.0.0
npm timing idealTree:ws Completed in 6ms
npm sill placeDep ROOT @nivo/recompose@0.70.0 OK for: @nivo/core@0.70.1 want: 0.70.0
npm sill placeDep ROOT @react-spring/web@9.1.2 OK for: @nivo/core@0.70.1 want: 9.1.2
npm sill placeDep ROOT react-dom@17.0.2 OK for: @react-spring/web@9.1.2 want: &gt;=16.8
npm sill placeDep ROOT react@17.0.2 REPLACE for: react-dom@17.0.2 want: 17.0.2
npm timing idealTree:node_modules/@nivo/core Completed in 6ms
npm timing idealTree:node_modules/@nivo/recompose Completed in 0ms
npm sill placeDep ROOT @nivo/annotations@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep ROOT @nivo/axes@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep ROOT @nivo/colors@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep ROOT @nivo/legends@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep ROOT @nivo/scales@0.70.0 OK for: @nivo/scatterplot@0.70.1 want: 0.70.0
npm sill placeDep ROOT @nivo/voronoi@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep node_modules/@nivo/scatterplot react-motion@0.5.2 OK for: @nivo/scatterplot@0.70.1 want: ^0.5.2
npm sill placeDep ROOT react@16.14.0 REPLACE for: react-motion@0.5.2 want: ^0.14.9 || ^15.3.0 || ^16.0.0
npm sill timing Tried to end timer that doesn't exist: idealTree:#root
npm sill placeDep ROOT @nivo/scatterplot@0.70.1 OK for: repro-ws@0.0.0 want: ^0.70.1
npm sill placeDep ROOT @nivo/core@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep ROOT @nivo/tooltip@0.70.1 OK for: @nivo/core@0.70.1 want: 0.70.1
npm sill placeDep ROOT prop-types@15.7.2 OK for: @nivo/core@0.70.1 want: &gt;= 15.5.10 &lt; 16.0.0
npm timing idealTree:ws Completed in 7ms
npm sill placeDep ROOT @nivo/recompose@0.70.0 OK for: @nivo/core@0.70.1 want: 0.70.0
npm sill placeDep ROOT @react-spring/web@9.1.2 OK for: @nivo/core@0.70.1 want: 9.1.2
npm sill placeDep ROOT react-dom@17.0.2 OK for: @react-spring/web@9.1.2 want: &gt;=16.8
npm sill placeDep ROOT react@17.0.2 REPLACE for: react-dom@17.0.2 want: 17.0.2
npm timing idealTree:node_modules/@nivo/core Completed in 6ms
npm timing idealTree:node_modules/@nivo/recompose Completed in 0ms
npm sill placeDep ROOT @nivo/annotations@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep ROOT @nivo/axes@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep ROOT @nivo/colors@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep ROOT @nivo/legends@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep ROOT @nivo/scales@0.70.0 OK for: @nivo/scatterplot@0.70.1 want: 0.70.0
npm sill placeDep ROOT @nivo/voronoi@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep node_modules/@nivo/scatterplot react-motion@0.5.2 OK for: @nivo/scatterplot@0.70.1 want: ^0.5.2
npm sill placeDep ROOT react@16.14.0 REPLACE for: react-motion@0.5.2 want: ^0.14.9 || ^15.3.0 || ^16.0.0
npm sill timing Tried to end timer that doesn't exist: idealTree:#root
npm sill placeDep ROOT @nivo/scatterplot@0.70.1 OK for: repro-ws@0.0.0 want: ^0.70.1
npm sill placeDep ROOT @nivo/core@0.70.1 OK for: @nivo/scatterplot@0.70.1 want: 0.70.1
npm sill placeDep ROOT @nivo/tooltip@0.70.1 OK for: @nivo/core@0.70.1 want: 0.70.1
npm sill placeDep ROOT prop-types@15.7.2 OK for: @nivo/core@0.70.1 want: &gt;= 15.5.10 &lt; 16.0.0
npm timing idealTree:ws Completed in 25ms
npm sill placeDep ROOT @nivo/recompose@0.70.0 OK for: @nivo/core@0.70.1 want: 0.70.0
npm sill placeDep ROOT @react-spring/web@9.1.2 OK for: @nivo/core@0.70.1 want: 9.1.2
npm sill placeDep ROOT react-dom@17.0.2 OK for: @react-spring/web@9.1.2 want: &gt;=16.8
npm sill placeDep ROOT react@17.0.2 REPLACE for: react-dom@17.0.2 want: 17.0.2
npm timing idealTree:node_modules/@nivo/core Completed in 17ms
npm timing idealTree:node_modules/@nivo/recompose Completed in 0ms
</code></pre></div>
</details>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">It should finish to install without errors. The behavior is correct if the dependency is not in a workspace.</p>
<h3 dir="auto">Steps To Reproduce</h3>
<ol dir="auto">
<li><code class="notranslate">git clone https://github.com/targos/npm-repro-infinite-loop.git</code></li>
<li><code class="notranslate">cd npm-repro-infinite-loop</code></li>
<li><code class="notranslate">npm install</code></li>
</ol>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>OS: Windows 10, CentOS 8</li>
<li>Node: 16.3.0</li>
<li>npm: 7.16.0</li>
</ul>