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.
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.
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.
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With