{"id":104,"hash":"65411b972c36177bd9296146eadb271eccfb3e7387773b9872f47d541aae22b1","pattern":"Unable to resolve dependency tree error when installing npm packages","full_message":"When trying to install the npm packages using npm i command, I am getting the following exception:\n\nnpm ERR! code ERESOLVE\nnpm ERR! ERESOLVE unable to resolve dependency tree\nnpm ERR!\nnpm ERR! While resolving: gf-kautomata-pipeline-ui@0.0.0\nnpm ERR! Found: @angular/core@9.1.12\nnpm ERR! node_modules/@angular/core\nnpm ERR!   @angular/core@\"^9.1.4\" from the root project\nnpm ERR!\nnpm ERR! Could not resolve dependency:\nnpm ERR! peer @angular/core@\"7.2.16\" from @angular/http@7.2.16\nnpm ERR! node_modules/@angular/http\nnpm ERR!   @angular/http@\"^7.2.11\" from the root project\nnpm ERR!\nnpm ERR! Fix the upstream dependency conflict, or retry\nnpm ERR! this command with --force, or --legacy-peer-deps\nnpm ERR! to accept an incorrect (and potentially broken) dependency resolution.\n\nI have tried reinstalling the Node.js package and setting the proxy to off using:\n\nset HTTP_PROXY=\nset HTTPS_PROXY=\n\nThe issue is still there. What I am doing wrong?\n\nUpdate:\n\nWhen I run the following command:\n\nnpm install --legacy-peer-deps\n\nThe following error is displayed:\n\nnpm ERR! code ETARGET\nnpm ERR! notarget No matching version found for @angular/http@^9.1.4.\nnpm ERR! notarget In most cases you or one of your dependencies are requesting\nnpm ERR! notarget a package version that doesn't exist.\n\nnpm ERR! A complete log of this run can be found in:","ecosystem":"npm","package_name":"angular","package_version":null,"solution":"This is not related to an HTTP proxy.\n\nYou have dependency conflict (incorrect and potentially broken dependency) as it says, so try to run the command with --force, or --legacy-peer-deps. If it doesn't take effect, the temporary solution is using prior versions of the Node.js (downgrading the Node.js version) as it causes this kind of errors to happen sometimes.\n\nUpdate based on the OP's update:\n\nAs you see, it fires the following error:\n\nNo matching version found for @angular/http@^9.1.4.\n\nTake a look at angular/http page. Note that the latest version for that deprecated package is 7.2.16 while you request an upper version (e.g., ^9.1.4)! So, try to check the project dependencies and follow the raised errors in order to solve the problem.","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/64573177/unable-to-resolve-dependency-tree-error-when-installing-npm-packages","votes":821,"created_at":"2026-04-19T04:41:20.060076+00:00","updated_at":"2026-04-19T04:51:17.795228+00:00"}