Reputation: 17
I am using Angular for the first time and I'm following a tutorial which is using angular/cli 8.3.6. I'm trying to create a new app to use in a ASP.NET Core project, but I am running into a dependency conflict whenever I attempt the setup.
I'm running the command ng new dutch-app --skip-git --inline-template --inline-style --skip-tests
and I'm getting an error from npm that asks me to resolve a dependency error between two packages, jasmine-core and karma-jasmine-html-reporter.
npm is installing [email protected] and then trying to install [email protected], but that package needs a later version of jasmine-core.
Here's a screenshot of my terminal:
When I check the versions I have installed for both of these packages, npm says jasmine-core is v3.6.0, and karma-jasmine-html reporter is v1.5.4
I'm new but I think I understand what is happening. I think that cli is creating a packages.json when it makes my app, and then npm installs the packages according to whats in that new packages.json in the new dutch-app directory. However, probably due to the fact that I'm trying to use an old version of angular/cli, the packages.json contains dependency conflicts.
Is there a way for me to edit the packages.json in my app before npm begins to install packages?
Upvotes: 0
Views: 324
Reputation: 17
I figured out how to solve this. I ran the ng command with --skip-install
, then edited the packages.json in the app folder to fix the dependency conflict. Then, I just ran npm install.
Upvotes: 0