Issue 1:
Is there an existing issue for this?

I have searched the existing issues

Current Behavior

High CPU usage with no sign of stopping.

Expected Behavior

The package gets installed.

Steps To Reproduce

npm install brettz9/rollup-plugin-postprocess#update --save-dev

Environment

OS: macOS 10.15.7 (19H524)

Node: v16.9.1

npm: 7.23.0

Issue 2:
Is there an existing issue for this?

I have searched the existing issues

Current Behavior

Running npm install in my repository without a package-lock.json file enters an infinite loop inside npm for a dependency in a workspace.

Looping part of the logs with `--loglevel silly`

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: >= 15.5.10 < 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: >=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: >= 15.5.10 < 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: >=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: >= 15.5.10 < 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: >=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

Expected Behavior

It should finish to install without errors. The behavior is correct if the dependency is not in a workspace.

Steps To Reproduce

git clone https://github.com/targos/npm-repro-infinite-loop.git

cd npm-repro-infinite-loop

npm install

Environment

OS: Windows 10, CentOS 8

Node: 16.3.0

npm: 7.16.0