npm install infinite recursion on building tree while using `--force` with certain package combinations
Open
Nobody has claimed this yet.
Bug
Priority 2
Release 8.x
- Dominant language
- JavaScript
- Stars
- 10.1k
- Forks
- 4.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
The following infinite recursion occurs when doing npm install:
200001 silly placeDep ROOT @ngtools/webpack@13.2.5 OK for: @angular-devkit/build-angular@13.2.5 want: 13.2.5
200002 silly placeDep ROOT typescript@4.5.5 REPLACE for: @ngtools/webpack@13.2.5 want: >=4.4.3 <4.6
200003 timing idealTree:node_modules/@angular-devkit/build-angular Completed in 1ms
200004 silly placeDep ROOT typescript@ REPLACE for: client@1.0.0 want: 4.6.0
200005 timing idealTree:#root Completed in 1ms
200006 silly placeDep ROOT @ngtools/webpack@13.2.5 OK for: @angular-devkit/build-angular@13.2.5 want: 13.2.5
200007 silly placeDep ROOT typescript@4.5.5 REPLACE for: @ngtools/webpack@13.2.5 want: >=4.4.3 <4.6
200008 timing idealTree:node_modules/@angular-devkit/build-angular Completed in 11ms
200009 silly placeDep ROOT typescript@ REPLACE for: client@1.0.0 want: 4.6.0
200010 timing idealTree:#root Completed in 0ms
200011 silly placeDep ROOT @ngtools/webpack@13.2.5 OK for: @angular-devkit/build-angular@13.2.5 want: 13.2.5
200012 silly placeDep ROOT typescript@4.5.5 REPLACE for: @ngtools/webpack@13.2.5 want: >=4.4.3 <4.6
200013 timing idealTree:node_modules/@angular-devkit/build-angular Completed in 1ms
200014 silly placeDep ROOT typescript@ REPLACE for: client@1.0.0 want: 4.6.0
200015 timing idealTree:#root Completed in 0ms
200016 silly placeDep ROOT @ngtools/webpack@13.2.5 OK for: @angular-devkit/build-angular@13.2.5 want: 13.2.5
200017 silly placeDep ROOT typescript@4.5.5 REPLACE for: @ngtools/webpack@13.2.5 want: >=4.4.3 <4.6
200018 timing idealTree:node_modules/@angular-devkit/build-angular Completed in 1ms
200019 silly placeDep ROOT typescript@ REPLACE for: client@1.0.0 want: 4.6.0
200020 timing idealTree:#root Completed in 0ms
200021 silly placeDep ROOT @ngtools/webpack@13.2.5 OK for: @angular-devkit/build-angular@13.2.5 want: 13.2.5
200022 silly placeDep ROOT typescript@4.5.5 REPLACE for: @ngtools/webpack@13.2.5 want: >=4.4.3 <4.6
200023 timing idealTree:node_modules/@angular-devkit/build-angular Completed in 1ms
200024 silly placeDep ROOT typescript@ REPLACE for: client@1.0.0 want: 4.6.0
200025 timing idealTree:#root Completed in 0ms
200026 silly placeDep ROOT @ngtools/webpack@13.2.5 OK for: @angular-devkit/build-angular@13.2.5 want: 13.2.5
200027 silly placeDep ROOT typescript@4.5.5 REPLACE for: @ngtools/webpack@13.2.5 want: >=4.4.3 <4.6
200028 timing idealTree:node_modules/@angular-devkit/build-angular Completed in 2ms
200029 silly placeDep ROOT typescript@ REPLACE for: client@1.0.0 want: 4.6.0
Expected Behavior
No response
Steps To Reproduce
{
"name": "client",
"version": "1.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"update": "ng update --allow-dirty --force @angular/cli @angular/core @clr/angular @clr/icons rxjs"
},
"private": true,
"dependencies": {
"@angular/animations": "^13.2.4",
"@angular/common": "^13.2.4",
"@angular/compiler": "^13.2.4",
"@angular/core": "^13.2.4",
"@angular/forms": "^13.2.4",
"@angular/platform-browser": "^13.2.4",
"@angular/platform-browser-dynamic": "^13.2.4",
"@angular/router": "^13.2.4",
"@cds/core": "5.6.4",
"@clr/angular": "13.0.2",
"@clr/icons": "13.0.2",
"@clr/ui": "13.0.2",
"@microsoft/signalr": "^6.0.2",
"@webcomponents/webcomponentsjs": "^2.6.0",
"clone": "^2.1.2",
"core-js": "^3.21.1",
"curray": "1.0.8",
"file-saver": "^2.0.5",
"guid-typescript": "^1.0.9",
"highcharts": "^9.3.3",
"highcharts-angular": "^3.0.0",
"highlight.js": "^11.4.0",
"json-formatter-js": "^2.3.4",
"moment": "^2.29.1",
"monaco-editor": "^0.32.1",
"ngx-cookie-service": "^13.1.2",
"ngx-highlightjs": "6.1.1",
"ngx-monaco-editor": "^12.0.0",
"rxjs": "^7.5.4",
"tslib": "^2.3.1",
"tslint-angular": "^3.0.3",
"tslint-config-prettier": "^1.18.0",
"vkbeautify": "^0.99.3",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^13.2.5",
"@angular/cli": "~13.2.5",
"@angular/compiler-cli": "^13.2.4",
"@angular/language-service": "^13.2.4",
"@types/file-saver": "^2.0.5",
"@types/jasmine": "~3.10.3",
"@types/jasminewd2": "~2.0.10",
"@types/node": "^17.0.21",
"@types/uuid": "^8.3.4",
"codelyzer": "^6.0.2",
"husky": "^7.0.4",
"jasmine-core": "~4.0.1",
"jasmine-spec-reporter": "~7.0.0",
"karma": "~6.3.17",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.3",
"karma-jasmine": "~4.0.1",
"karma-jasmine-html-reporter": "^1.7.0",
"prettier": "^2.5.1",
"pretty-quick": "^3.1.3",
"protractor": "~7.0.0",
"ts-node": "~10.6.0",
"tslint": "~6.1.3",
"typescript": "4.6.0"
}
}
Environment
- npm: 8.5.2
- Node.js: v16.14.0
- OS Name: Windows 10
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the loop with the package.json dependency set shown in the issue, using npm 8.5.2 and Node.js v16.14.0 on Windows 10, and run npm install with --force. Trace the repeated idealTree output involving @angular-devkit/build-angular and typescript; done means the install terminates instead of recursing indefinitely.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100