I tried to run a project downloaded from github. Unfortunately, during npm install
the following warnings were shown. I tried to change the version based on thi
You need to only depend on one major version of angular, so update all modules depending on angular 2.x :
The accepted answer of using npm-install-peers did not work, nor removing node_modules and rebuilding. The answer to run
npm install --save-dev @xxxxx/xxxxx@latest
for each one, with the xxxxx referring to the exact text in the peer warning, worked. I only had four warnings, if I had a dozen or more as in the question, it might be a good idea to script the commands.
I had a similar issue and solved after running these instructions!
npm install npm -g
npm install --save-dev @angular/cli@latest
npm install
npm start
npm i -D @angular/material @angular/cdk @angular/animations