Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unmet Peer Dependency Error

Tags:

npm

angular

npm WARN @schematics/[email protected] requires a peer of @angular-devkit/[email protected] but none is installed. You must install peer dependencies yourself.

Earlier I installed angular cli by using npm install -g @angular/cli then i uninstalled and installed npm install -g @angular/cli@latest. Now many earlier packages are not compatible, so I again uninstalled and installed angular cli using command npm install -g @angular/[email protected]. Now when i was trying to download various packages, I am unable to. I tried downloading bootstrap using npm install bootstrap --save, the below warning occurs:

npm WARN @schematics/[email protected] requires a peer of @angular-devkit/[email protected] but none is installed. You must install peer dependencies yourself.

Please help me how I can start fresh and have all packages intact.

like image 356
Meenakshi Avatar asked Nov 08 '17 09:11

Meenakshi


People also ask

What is unmet Peer dependency?

UNMET PEER DEPENDENCY error is thrown when the dependencies of one or more modules specified in the package. json file is not met. Check the warnings carefully and update the package. json file with correct versions of dependencies.

What does peer dependency mean?

A peer dependency specifies that our package is compatible with a particular version of an npm package. If a package doesn't already exist in the node_modules directory, then it is automatically added. As you install a package, npm will automatically install the dev dependencies.

How do you ignore peer dependencies?

Using --legacy-peer-deps will usually allow you to install the package without meeting the peer dependency requirements. (This was the default using npm@6 so I assume you are using npm@7 if you are seeing a problem.) If that doesn't work, --force will install without regard to peer dependencies. Save this answer.

How do you install unmet Peer dependency yarn?

Usage. Run npm install (or yarn install ) to install prod and dev , as well as peer dependencies. You still may see "unmet peer dependency" warnings, due to installation flow of npm/yarn. Also it won't update lock (shrinkwrap) files or modify package.


1 Answers

I just had this issue, you'll need to install it via NPM. Not sure why it doesn't get automatically installed.

npm install @angular-devkit/[email protected] --save

like image 81
cjd82187 Avatar answered Nov 15 '22 23:11

cjd82187