Coding⏱️ 2 min read📅 2026-06-03

How to Fix: unable to resolve dependency tree error for creating new angular project

Quick Answer: Try updating jasmine-core to a version that satisfies the peer dependency for karma-jasmine-html-reporter, or consider using a different testing library.

The 'unable to resolve dependency tree' error occurs when npm or yarn is unable to find the required dependencies for a project. In this case, it seems that there's an issue with the jasmine-core and karma-jasmine-html-reporter packages.

⚠️ Common Causes

  • Outdated or incompatible dependencies in the project's package.json file.

🔧 Proven Troubleshooting Steps

Method 1: Update Dependencies

  1. Step 1: Run the command `npm install` or `yarn install` to update all dependencies.

Method 2: Update Specific Packages

  1. Step 1: Open the project's package.json file and update the jasmine-core and karma-jasmine-html-reporter versions to their latest compatible versions.

🎯 Final Words

To resolve this issue, try updating your dependencies and packages. If the problem persists, consider deleting the node_modules folder and running `npm install` or `yarn install` again.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions